Signed-off-by: Fabian Ebner <f.eb...@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to