Explorar o código

Clean up navigation menu

jeremystretch %!s(int64=2) %!d(string=hai) anos
pai
achega
37aa07eea1

+ 40 - 14
netbox/netbox/navigation/menu.py

@@ -265,17 +265,24 @@ POWER_MENU = Menu(
     ),
 )
 
-OTHER_MENU = Menu(
-    label=_('Other'),
-    icon_class='mdi mdi-notification-clear-all',
+PROVISIONING_MENU = Menu(
+    label=_('Provisioning'),
+    icon_class='mdi mdi-file-document-multiple-outline',
     groups=(
         MenuGroup(
-            label=_('Logging'),
+            label=_('Configurations'),
             items=(
-                get_model_item('extras', 'journalentry', _('Journal Entries'), actions=[]),
-                get_model_item('extras', 'objectchange', _('Change Log'), actions=[]),
+                get_model_item('extras', 'configcontext', _('Config Contexts'), actions=['add']),
+                get_model_item('extras', 'configtemplate', _('Config Templates'), actions=['add']),
             ),
         ),
+    ),
+)
+
+CUSTOMIZATION_MENU = Menu(
+    label=_('Customization'),
+    icon_class='mdi mdi-toolbox-outline',
+    groups=(
         MenuGroup(
             label=_('Customization'),
             items=(
@@ -283,13 +290,12 @@ OTHER_MENU = Menu(
                 get_model_item('extras', 'customlink', _('Custom Links')),
                 get_model_item('extras', 'exporttemplate', _('Export Templates')),
                 get_model_item('extras', 'savedfilter', _('Saved Filters')),
+                get_model_item('extras', 'tag', 'Tags'),
             ),
         ),
         MenuGroup(
-            label=_('Integrations'),
+            label=_('Reports & Scripts'),
             items=(
-                get_model_item('core', 'datasource', _('Data Sources')),
-                get_model_item('extras', 'webhook', _('Webhooks')),
                 MenuItem(
                     link='extras:report_list',
                     link_text=_('Reports'),
@@ -300,6 +306,25 @@ OTHER_MENU = Menu(
                     link_text=_('Scripts'),
                     permissions=['extras.view_script']
                 ),
+            ),
+        ),
+    ),
+)
+
+OPERATIONS_MENU = Menu(
+    label=_('Operations'),
+    icon_class='mdi mdi-cogs',
+    groups=(
+        MenuGroup(
+            label=_('Integrations'),
+            items=(
+                get_model_item('core', 'datasource', _('Data Sources')),
+                get_model_item('extras', 'webhook', _('Webhooks')),
+            ),
+        ),
+        MenuGroup(
+            label=_('Jobs'),
+            items=(
                 MenuItem(
                     link='extras:jobresult_list',
                     link_text=_('Jobs'),
@@ -308,11 +333,10 @@ OTHER_MENU = Menu(
             ),
         ),
         MenuGroup(
-            label=_('Other'),
+            label=_('Logging'),
             items=(
-                get_model_item('extras', 'tag', 'Tags'),
-                get_model_item('extras', 'configcontext', _('Config Contexts'), actions=['add']),
-                get_model_item('extras', 'configtemplate', _('Config Templates'), actions=['add']),
+                get_model_item('extras', 'journalentry', _('Journal Entries'), actions=[]),
+                get_model_item('extras', 'objectchange', _('Change Log'), actions=[]),
             ),
         ),
     ),
@@ -329,7 +353,9 @@ MENUS = [
     VIRTUALIZATION_MENU,
     CIRCUITS_MENU,
     POWER_MENU,
-    OTHER_MENU,
+    PROVISIONING_MENU,
+    CUSTOMIZATION_MENU,
+    OPERATIONS_MENU,
 ]
 
 #

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
netbox/project-static/dist/netbox-dark.css


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
netbox/project-static/dist/netbox-light.css


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
netbox/project-static/dist/netbox-print.css


+ 5 - 3
netbox/project-static/styles/sidenav.scss

@@ -185,6 +185,10 @@
     margin-bottom: 0;
   }
 
+  .nav {
+    margin-bottom: 0.5rem;
+  }
+
   // Child Link nav-item
   .nav .nav-item {
     display: flex;
@@ -193,8 +197,7 @@
     width: 100%;
 
     &.no-buttons {
-      // When there are no buttons, don't extend to the full width of the sidenav.
-      padding-right: $spacer * 5;
+      padding-right: 0.5rem;
     }
   }
 
@@ -262,7 +265,6 @@
     margin-left: -$sidenav-spacing-x;
 
     .nav-item {
-      margin-top: 2px;
 
       &.disabled {
         cursor: not-allowed;

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio