[pbs-devel] [PATCH proxmox-backup 4/4] ui: tape: add notify-user fields

Dominik Csapak d.csapak at proxmox.com
Fri Mar 5 09:45:32 CET 2021


to backup jobs, backups and restores

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/tape/window/TapeBackup.js    | 9 +++++++++
 www/tape/window/TapeBackupJob.js | 9 +++++++++
 www/tape/window/TapeRestore.js   | 9 +++++++++
 3 files changed, 27 insertions(+)

diff --git a/www/tape/window/TapeBackup.js b/www/tape/window/TapeBackup.js
index 30180146..ca9d3b5f 100644
--- a/www/tape/window/TapeBackup.js
+++ b/www/tape/window/TapeBackup.js
@@ -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 at pam',
+	    value: null,
+	    allowBlank: true,
+	    renderer: Ext.String.htmlEncode,
+	},
     ],
 });
diff --git a/www/tape/window/TapeBackupJob.js b/www/tape/window/TapeBackupJob.js
index e7f89d69..b5e98572 100644
--- a/www/tape/window/TapeBackupJob.js
+++ b/www/tape/window/TapeBackupJob.js
@@ -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 at pam',
+		allowBlank: true,
+		renderer: Ext.String.htmlEncode,
+	    },
 	],
 
 	column2: [
diff --git a/www/tape/window/TapeRestore.js b/www/tape/window/TapeRestore.js
index 9e0a5edb..8d26e81e 100644
--- a/www/tape/window/TapeRestore.js
+++ b/www/tape/window/TapeRestore.js
@@ -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,
+	},
     ],
 });
-- 
2.20.1






More information about the pbs-devel mailing list