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 <[email protected]>
---

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



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to