[pbs-devel] [PATCH proxmox-backup v2 34/43] ui: datastore edit: make new stores use notification system by default

Lukas Wagner l.wagner at proxmox.com
Wed Apr 17 16:35:05 CEST 2024


Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
Tested-by: Gabriel Goller <g.goller at proxmox.com>
Reviewed-by: Gabriel Goller <g.goller at proxmox.com>
---
 www/window/DataStoreEdit.js | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/www/window/DataStoreEdit.js b/www/window/DataStoreEdit.js
index aecf6b8d..b6115460 100644
--- a/www/window/DataStoreEdit.js
+++ b/www/window/DataStoreEdit.js
@@ -39,6 +39,9 @@ Ext.define('PBS.DataStoreEdit', {
 		title: gettext('General'),
 		xtype: 'inputpanel',
 		onlineHelp: 'datastore_intro',
+		cbind: {
+		    isCreate: '{isCreate}',
+		},
 		column1: [
 		    {
 			xtype: 'pmxDisplayEditField',
@@ -90,6 +93,16 @@ Ext.define('PBS.DataStoreEdit', {
 			fieldLabel: gettext('Comment'),
 		    },
 		],
+
+		onGetValues: function(values) {
+		    let me = this;
+
+		    if (me.isCreate) {
+			// New datastores default to using the notification system
+			values['notification-mode'] = 'notification-system';
+		    }
+		    return values;
+		},
 	    },
 	    {
 		title: gettext('Prune Options'),
-- 
2.39.2





More information about the pbs-devel mailing list