web/admin: migrate events notification rules to web

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-03-29 19:21:48 +02:00
parent 6c999d10c3
commit 81ac53ff0a
6 changed files with 135 additions and 100 deletions

View File

@ -15,15 +15,6 @@ export const SIDEBAR_ITEMS: SidebarItem[] = [
).when((): Promise<boolean> => {
return me().then(u => u.user.isSuperuser||false);
}),
new SidebarItem("Events").children(
new SidebarItem("Logs", "/events/log").activeWhen(
`^/events/log/(?<id>${UUID_REGEX})$`
),
new SidebarItem("Notification Rules", "/events/rules"),
new SidebarItem("Notification Transports", "/events/transports"),
).when((): Promise<boolean> => {
return me().then(u => u.user.isSuperuser||false);
}),
new SidebarItem("Resources").children(
new SidebarItem("Applications", "/core/applications").activeWhen(
`^/core/applications/(?<slug>${SLUG_REGEX})$`
@ -39,6 +30,15 @@ export const SIDEBAR_ITEMS: SidebarItem[] = [
).when((): Promise<boolean> => {
return me().then(u => u.user.isSuperuser||false);
}),
new SidebarItem("Events").children(
new SidebarItem("Logs", "/events/log").activeWhen(
`^/events/log/(?<id>${UUID_REGEX})$`
),
new SidebarItem("Notification Rules", "/events/rules"),
new SidebarItem("Notification Transports", "/events/transports"),
).when((): Promise<boolean> => {
return me().then(u => u.user.isSuperuser || false);
}),
new SidebarItem("Customisation").children(
new SidebarItem("Policies", "/policy/policies"),
new SidebarItem("Property Mappings", "/core/property-mappings"),