[pve-devel] [PATCH manager 5/7] ui: safe destroy guest: add checkbox for removal of unreferenced disks
Fabian Ebner
f.ebner at proxmox.com
Mon Apr 19 15:14:39 CEST 2021
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
Dependency bump for pve-container and qemu-server is needed. Ideally, the
dependency bump for qemu-server also includes [0], so people with snapshots
don't run into left-over VM state disks.
[0]: https://lists.proxmox.com/pipermail/pve-devel/2021-April/047685.html
www/manager6/window/SafeDestroyGuest.js | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/www/manager6/window/SafeDestroyGuest.js b/www/manager6/window/SafeDestroyGuest.js
index d6121594..a8a86d07 100644
--- a/www/manager6/window/SafeDestroyGuest.js
+++ b/www/manager6/window/SafeDestroyGuest.js
@@ -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();
},
});
--
2.20.1
More information about the pve-devel
mailing list