From 4d22659b6e28d7f1e675f5096ad87ecbf53bf039 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 16 Dec 2020 16:04:11 +0100 Subject: [PATCH] web: re-organise sidebar --- web/src/interfaces/AdminInterface.ts | 40 +++++++++++++++------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/web/src/interfaces/AdminInterface.ts b/web/src/interfaces/AdminInterface.ts index f3e1b766d..79f4c3f3f 100644 --- a/web/src/interfaces/AdminInterface.ts +++ b/web/src/interfaces/AdminInterface.ts @@ -6,12 +6,14 @@ import { Interface } from "./Interface"; export const SIDEBAR_ITEMS: SidebarItem[] = [ new SidebarItem("Library", "/library/"), - new SidebarItem("Monitor", "/audit/audit").when((): Promise => { + new SidebarItem("Monitor").children( + new SidebarItem("Overview", "/administration/overview-ng/"), + new SidebarItem("System Tasks", "/administration/tasks/"), + new SidebarItem("Events", "/audit/audit"), + ).when((): Promise => { return User.me().then(u => u.is_superuser); }), new SidebarItem("Administration").children( - new SidebarItem("Overview", "/administration/overview-ng/"), - new SidebarItem("System Tasks", "/administration/tasks/"), new SidebarItem("Applications", "/administration/applications/").activeWhen( `^/applications/(?${SLUG_REGEX})/$` ), @@ -19,27 +21,29 @@ export const SIDEBAR_ITEMS: SidebarItem[] = [ `^/sources/(?${SLUG_REGEX})/$`, ), new SidebarItem("Providers", "/administration/providers/"), - new SidebarItem("Flows").children( - new SidebarItem("Flows", "/administration/flows/").activeWhen(`^/flows/(?${SLUG_REGEX})/$`), - new SidebarItem("Stages", "/administration/stages/"), - new SidebarItem("Prompts", "/administration/stages/prompts/"), - new SidebarItem("Invitations", "/administration/stages/invitations/"), - ), - new SidebarItem("User Management").children( - new SidebarItem("User", "/administration/users/"), - new SidebarItem("Groups", "/administration/groups/") - ), - new SidebarItem("Outposts").children( - new SidebarItem("Outposts", "/administration/outposts/"), - new SidebarItem("Service Connections", "/administration/outposts/service_connections/") - ), + new SidebarItem("Outposts", "/administration/outposts/"), + new SidebarItem("Outpost Service Connections", "/administration/outposts/service_connections/"), new SidebarItem("Policies", "/administration/policies/"), new SidebarItem("Property Mappings", "/administration/property-mappings"), new SidebarItem("Certificates", "/administration/crypto/certificates"), new SidebarItem("Tokens", "/administration/tokens/"), ).when((): Promise => { return User.me().then(u => u.is_superuser); - }) + }), + new SidebarItem("Flows").children( + new SidebarItem("Flows", "/administration/flows/").activeWhen(`^/flows/(?${SLUG_REGEX})/$`), + new SidebarItem("Stages", "/administration/stages/"), + new SidebarItem("Prompts", "/administration/stages/prompts/"), + new SidebarItem("Invitations", "/administration/stages/invitations/"), + ).when((): Promise => { + return User.me().then(u => u.is_superuser); + }), + new SidebarItem("User Management").children( + new SidebarItem("User", "/administration/users/"), + new SidebarItem("Groups", "/administration/groups/") + ).when((): Promise => { + return User.me().then(u => u.is_superuser); + }), ]; @customElement("ak-interface-admin")