[pve-devel] [PATCH v2 manager 3/3] fix #2745: ui: backup: allow users to specify remove=1

Fabian Ebner f.ebner at proxmox.com
Wed Mar 3 12:50:42 CET 2021


A user with Datastore.AllocateSpace, VM.Audit, VM.Backup can already remove
backups from the GUI manually, so it shouldn't be a problem if they can set
the remove flag when starting a manual backup in the GUI.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

Changes from v1:
    * Rebase on current master.
    * Do not use the label 'Remove', because that is rather confusing, instead
      use 'Prune'.

 www/manager6/window/Backup.js | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js
index 615073f3..d5b585bb 100644
--- a/www/manager6/window/Backup.js
+++ b/www/manager6/window/Backup.js
@@ -68,6 +68,17 @@ Ext.define('PVE.window.Backup', {
 		    name: 'mailto',
 		    emptyText: Proxmox.Utils.noneText,
 		},
+		{
+		    xtype: 'proxmoxcheckbox',
+		    name: 'remove',
+		    checked: false,
+		    uncheckedValue: 0,
+		    fieldLabel: gettext('Prune'),
+		    autoEl: {
+			tag: 'div',
+			'data-qtip': gettext('Prune older backups afterwards'),
+		    },
+		},
 	    ],
 	});
 
@@ -82,7 +93,7 @@ Ext.define('PVE.window.Backup', {
 		    storage: storage,
 		    vmid: me.vmid,
 		    mode: values.mode,
-		    remove: 0,
+		    remove: values.remove,
 		};
 
 		if (values.mailto) {
-- 
2.20.1






More information about the pve-devel mailing list