ui: safe destroy guest: add checkbox for removal of unreferenced disks

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner 2021-04-19 15:14:39 +02:00 committed by Thomas Lamprecht
parent 2452e18de4
commit 94d2359b78

View File

@ -17,6 +17,17 @@ Ext.define('PVE.window.SafeDestroyGuest', {
'data-qtip': gettext('Remove from replication and backup jobs'),
},
},
{
xtype: 'proxmoxcheckbox',
name: 'destroyUnreferenced',
reference: 'destroyUnreferencedCheckbox',
boxLabel: gettext('Destroy unreferenced disks'),
checked: false,
autoEl: {
tag: 'div',
'data-qtip': gettext('Scan all storages for unreferenced disks'),
},
},
],
getParams: function() {
@ -25,6 +36,9 @@ Ext.define('PVE.window.SafeDestroyGuest', {
const purgeCheckbox = me.lookupReference('purgeCheckbox');
me.params.purge = purgeCheckbox.checked ? 1 : 0;
const destroyUnreferencedCheckbox = me.lookupReference('destroyUnreferencedCheckbox');
me.params["destroy-unreferenced-disks"] = destroyUnreferencedCheckbox.checked ? 1 : 0;
return me.callParent();
},
});