ui: tape: add notify-user fields

to backup jobs, backups and restores

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-03-05 09:45:32 +01:00 committed by Dietmar Maurer
parent 9152a0077f
commit be8adca115
3 changed files with 27 additions and 0 deletions

View File

@ -49,5 +49,14 @@ Ext.define('PBS.TapeManagement.TapeBackupWindow', {
name: 'eject-media',
fieldLabel: gettext('Eject Media'),
},
{
xtype: 'pbsUserSelector',
name: 'notify-user',
fieldLabel: gettext('Notify User'),
emptyText: 'root@pam',
value: null,
allowBlank: true,
renderer: Ext.String.htmlEncode,
},
],
});

View File

@ -35,6 +35,7 @@ Ext.define('PBS.TapeManagement.BackupJobEdit', {
if (values['export-media-set'] && !me.up('pbsTapeBackupJobEdit').isCreate) {
Proxmox.Utils.assemble_field_data(values, { "delete": 'eject-media' });
}
PBS.Utils.delete_if_default(values, 'notify-user');
return values;
},
column1: [
@ -63,6 +64,14 @@ Ext.define('PBS.TapeManagement.BackupJobEdit', {
fieldLabel: gettext('Drive'),
name: 'drive',
},
{
xtype: 'pbsUserSelector',
name: 'notify-user',
fieldLabel: gettext('Notify User'),
emptyText: 'root@pam',
allowBlank: true,
renderer: Ext.String.htmlEncode,
},
],
column2: [

View File

@ -41,5 +41,14 @@ Ext.define('PBS.TapeManagement.TapeRestoreWindow', {
fieldLabel: gettext('Drive'),
name: 'drive',
},
{
xtype: 'pbsUserSelector',
name: 'notify-user',
fieldLabel: gettext('Notify User'),
emptyText: gettext('Current User'),
value: null,
allowBlank: true,
renderer: Ext.String.htmlEncode,
},
],
});