]> git.proxmox.com Git - proxmox-backup.git/commitdiff
ui: tape restore: add 'notification-mode' parameter
authorLukas Wagner <l.wagner@proxmox.com>
Tue, 23 Apr 2024 11:52:16 +0000 (13:52 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 Apr 2024 21:14:46 +0000 (23:14 +0200)
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Gabriel Goller <g.goller@proxmox.com>
Reviewed-by: Gabriel Goller <g.goller@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/tape/window/TapeRestore.js

index c686c9586a8c18782335713e2bdd24510935164a..61a2fcd75e9c0dab724d5c86ea1c3d107b02a04e 100644 (file)
@@ -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',