[pbs-devel] [PATCH proxmox-backup v2 31/43] ui: tape restore: add 'notification-mode' parameter

Lukas Wagner l.wagner at proxmox.com
Wed Apr 17 16:35:02 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/tape/window/TapeRestore.js | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/www/tape/window/TapeRestore.js b/www/tape/window/TapeRestore.js
index c686c958..61a2fcd7 100644
--- a/www/tape/window/TapeRestore.js
+++ b/www/tape/window/TapeRestore.js
@@ -33,6 +33,7 @@ Ext.define('PBS.TapeManagement.TapeRestoreWindow', {
 	data: {
 	    uuid: "",
 	    singleDatastore: true,
+	    notificationMode: 'notification-system',
 	},
 	formulas: {
 	    singleSelectorLabel: get =>
@@ -40,6 +41,7 @@ Ext.define('PBS.TapeManagement.TapeRestoreWindow', {
 	    singleSelectorEmptyText: get => get('singleDatastore') ? '' : Proxmox.Utils.NoneText,
 	    singleSelectorLabelNs: get =>
 		get('singleDatastore') ? gettext('Target Namespace') : gettext('Default Namespace'),
+	    notificationSystemSelected: (get) => get('notificationMode') === 'notification-system',
 	},
     },
 
@@ -428,6 +430,18 @@ Ext.define('PBS.TapeManagement.TapeRestoreWindow', {
 			return values;
 		    },
 		    column1: [
+			{
+			    xtype: 'proxmoxKVComboBox',
+			    comboItems: [
+				['legacy-sendmail', gettext('Email (legacy)')],
+				['notification-system', gettext('Notification system')],
+			    ],
+			    fieldLabel: gettext('Notification mode'),
+			    name: 'notification-mode',
+			    bind: {
+				value: '{notificationMode}',
+			    },
+			},
 			{
 			    xtype: 'pmxUserSelector',
 			    name: 'notify-user',
@@ -437,6 +451,9 @@ Ext.define('PBS.TapeManagement.TapeRestoreWindow', {
 			    allowBlank: true,
 			    skipEmptyText: true,
 			    renderer: Ext.String.htmlEncode,
+			    bind: {
+				disabled: "{notificationSystemSelected}",
+			    },
 			},
 			{
 			    xtype: 'pbsAuthidSelector',
-- 
2.39.2





More information about the pbs-devel mailing list