web: re-organise sidebar
This commit is contained in:
parent
2c0709eeee
commit
4d22659b6e
|
@ -6,12 +6,14 @@ import { Interface } from "./Interface";
|
||||||
|
|
||||||
export const SIDEBAR_ITEMS: SidebarItem[] = [
|
export const SIDEBAR_ITEMS: SidebarItem[] = [
|
||||||
new SidebarItem("Library", "/library/"),
|
new SidebarItem("Library", "/library/"),
|
||||||
new SidebarItem("Monitor", "/audit/audit").when((): Promise<boolean> => {
|
new SidebarItem("Monitor").children(
|
||||||
|
new SidebarItem("Overview", "/administration/overview-ng/"),
|
||||||
|
new SidebarItem("System Tasks", "/administration/tasks/"),
|
||||||
|
new SidebarItem("Events", "/audit/audit"),
|
||||||
|
).when((): Promise<boolean> => {
|
||||||
return User.me().then(u => u.is_superuser);
|
return User.me().then(u => u.is_superuser);
|
||||||
}),
|
}),
|
||||||
new SidebarItem("Administration").children(
|
new SidebarItem("Administration").children(
|
||||||
new SidebarItem("Overview", "/administration/overview-ng/"),
|
|
||||||
new SidebarItem("System Tasks", "/administration/tasks/"),
|
|
||||||
new SidebarItem("Applications", "/administration/applications/").activeWhen(
|
new SidebarItem("Applications", "/administration/applications/").activeWhen(
|
||||||
`^/applications/(?<slug>${SLUG_REGEX})/$`
|
`^/applications/(?<slug>${SLUG_REGEX})/$`
|
||||||
),
|
),
|
||||||
|
@ -19,27 +21,29 @@ export const SIDEBAR_ITEMS: SidebarItem[] = [
|
||||||
`^/sources/(?<slug>${SLUG_REGEX})/$`,
|
`^/sources/(?<slug>${SLUG_REGEX})/$`,
|
||||||
),
|
),
|
||||||
new SidebarItem("Providers", "/administration/providers/"),
|
new SidebarItem("Providers", "/administration/providers/"),
|
||||||
new SidebarItem("Flows").children(
|
new SidebarItem("Outposts", "/administration/outposts/"),
|
||||||
new SidebarItem("Flows", "/administration/flows/").activeWhen(`^/flows/(?<slug>${SLUG_REGEX})/$`),
|
new SidebarItem("Outpost Service Connections", "/administration/outposts/service_connections/"),
|
||||||
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("Policies", "/administration/policies/"),
|
new SidebarItem("Policies", "/administration/policies/"),
|
||||||
new SidebarItem("Property Mappings", "/administration/property-mappings"),
|
new SidebarItem("Property Mappings", "/administration/property-mappings"),
|
||||||
new SidebarItem("Certificates", "/administration/crypto/certificates"),
|
new SidebarItem("Certificates", "/administration/crypto/certificates"),
|
||||||
new SidebarItem("Tokens", "/administration/tokens/"),
|
new SidebarItem("Tokens", "/administration/tokens/"),
|
||||||
).when((): Promise<boolean> => {
|
).when((): Promise<boolean> => {
|
||||||
return User.me().then(u => u.is_superuser);
|
return User.me().then(u => u.is_superuser);
|
||||||
})
|
}),
|
||||||
|
new SidebarItem("Flows").children(
|
||||||
|
new SidebarItem("Flows", "/administration/flows/").activeWhen(`^/flows/(?<slug>${SLUG_REGEX})/$`),
|
||||||
|
new SidebarItem("Stages", "/administration/stages/"),
|
||||||
|
new SidebarItem("Prompts", "/administration/stages/prompts/"),
|
||||||
|
new SidebarItem("Invitations", "/administration/stages/invitations/"),
|
||||||
|
).when((): Promise<boolean> => {
|
||||||
|
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<boolean> => {
|
||||||
|
return User.me().then(u => u.is_superuser);
|
||||||
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
@customElement("ak-interface-admin")
|
@customElement("ak-interface-admin")
|
||||||
|
|
Reference in New Issue