2
0
Эх сурвалжийг харах

16725 - The admin section should always come last in the navigation menu (#16762)

* I replaced `append` with `insert` into menu.py to make the admin section appear last in the navigation menu.

* Clean up ordering logic

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
Julio Oliveira at Encora 1 жил өмнө
parent
commit
00d23a0cff

+ 5 - 5
netbox/netbox/navigation/menu.py

@@ -462,16 +462,13 @@ MENUS = [
     PROVISIONING_MENU,
     CUSTOMIZATION_MENU,
     OPERATIONS_MENU,
-    ADMIN_MENU,
 ]
 
-#
-# Add plugin menus
-#
-
+# Add top-level plugin menus
 for menu in registry['plugins']['menus']:
     MENUS.append(menu)
 
+# Add the default "plugins" menu
 if registry['plugins']['menu_items']:
 
     # Build the default plugins menu
@@ -485,3 +482,6 @@ if registry['plugins']['menu_items']:
         groups=groups
     )
     MENUS.append(plugins_menu)
+
+# Add the admin menu last
+MENUS.append(ADMIN_MENU)