From 0098c9f6f256f83edbda49df5d95770c41420f18 Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Tue, 23 Apr 2024 13:52:13 +0200 Subject: [PATCH] ui: add notification config panel This commit adds the same notification configuration panel that we already use in Proxmox VE. Signed-off-by: Lukas Wagner Tested-by: Gabriel Goller Reviewed-by: Gabriel Goller Tested-by: Maximiliano Sandoval Signed-off-by: Thomas Lamprecht --- www/Makefile | 1 + www/NavigationTree.js | 6 ++++++ www/config/NotificationConfigView.js | 11 +++++++++++ 3 files changed, 18 insertions(+) create mode 100644 www/config/NotificationConfigView.js diff --git a/www/Makefile b/www/Makefile index b612a116..f86cbb4d 100644 --- a/www/Makefile +++ b/www/Makefile @@ -68,6 +68,7 @@ JSSRC= \ config/CertificateView.js \ config/NodeOptionView.js \ config/MetricServerView.js \ + config/NotificationConfigView.js \ config/PruneAndGC.js \ window/ACLEdit.js \ window/BackupGroupChangeOwner.js \ diff --git a/www/NavigationTree.js b/www/NavigationTree.js index 3e0040f7..a5ea390f 100644 --- a/www/NavigationTree.js +++ b/www/NavigationTree.js @@ -68,6 +68,12 @@ Ext.define('PBS.store.NavigationStore', { path: 'pbsCertificateConfiguration', leaf: true, }, + { + text: gettext('Notifications'), + iconCls: 'fa fa-bell-o', + path: 'pbsNotificationConfigView', + leaf: true, + }, { text: gettext('Subscription'), iconCls: 'fa fa-support', diff --git a/www/config/NotificationConfigView.js b/www/config/NotificationConfigView.js new file mode 100644 index 00000000..904cee71 --- /dev/null +++ b/www/config/NotificationConfigView.js @@ -0,0 +1,11 @@ +Ext.define('PBS.config.NotificationConfigView', { + extend: 'Proxmox.panel.NotificationConfigView', + alias: ['widget.pbsNotificationConfigView'], + mixins: ['Proxmox.Mixin.CBind'], + + cbindData: function(_initialConfig) { + return { + baseUrl: '/config/notifications', + }; + }, +});