[pbs-devel] [PATCH proxmox-backup 21/33] ui: add notification config panel

Lukas Wagner l.wagner at proxmox.com
Fri Apr 12 12:06:19 CEST 2024


This commit adds the same notification configuration panel that we
already use in Proxmox VE.

Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
 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 79cb4c04..f3d90bc4 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -67,6 +67,7 @@ JSSRC=							\
 	config/CertificateView.js			\
 	config/NodeOptionView.js			\
 	config/MetricServerView.js			\
+	config/NotificationConfigView.js	\
 	window/ACLEdit.js				\
 	window/BackupGroupChangeOwner.js		\
 	window/CreateDirectory.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',
+        };
+    },
+});
-- 
2.39.2





More information about the pbs-devel mailing list