ui: tape restore: add 'notification-mode' parameter

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>
This commit is contained in:
Lukas Wagner 2024-04-23 13:52:16 +02:00 committed by Thomas Lamprecht
parent 168e2f2967
commit 461d0276e2

View 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',