From 00d23a0cffa19c491c9219c847f206eec4d054a9 Mon Sep 17 00:00:00 2001 From: Julio Oliveira at Encora <149191228+Julio-Oliveira-Encora@users.noreply.github.com> Date: Sun, 30 Jun 2024 12:30:39 -0300 Subject: [PATCH] 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 --- netbox/netbox/navigation/menu.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/netbox/netbox/navigation/menu.py b/netbox/netbox/navigation/menu.py index 002dfd98a..cae9cb321 100644 --- a/netbox/netbox/navigation/menu.py +++ b/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)