]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/window/SafeDestroyGuest.js
ui: storage content: transform detected compression extension to lower-case
[pve-manager.git] / www / manager6 / window / SafeDestroyGuest.js
1 /*
2 * SafeDestroy window with additional checkboxes for removing guests
3 */
4 Ext.define('PVE.window.SafeDestroyGuest', {
5 extend: 'Proxmox.window.SafeDestroy',
6 alias: 'widget.pveSafeDestroyGuest',
7
8 additionalItems: [
9 {
10 xtype: 'proxmoxcheckbox',
11 name: 'purge',
12 reference: 'purgeCheckbox',
13 boxLabel: gettext('Purge from job configurations'),
14 checked: false,
15 autoEl: {
16 tag: 'div',
17 'data-qtip': gettext('Remove from replication, HA and backup jobs'),
18 },
19 },
20 {
21 xtype: 'proxmoxcheckbox',
22 name: 'destroyUnreferenced',
23 reference: 'destroyUnreferencedCheckbox',
24 boxLabel: gettext('Destroy unreferenced disks owned by guest'),
25 checked: false,
26 autoEl: {
27 tag: 'div',
28 'data-qtip': gettext('Scan all enabled storages for unreferenced disks and delete them.'),
29 },
30 },
31 ],
32
33 note: gettext('Referenced disks will always be destroyed.'),
34
35 getParams: function() {
36 let me = this;
37
38 const purgeCheckbox = me.lookupReference('purgeCheckbox');
39 me.params.purge = purgeCheckbox.checked ? 1 : 0;
40
41 const destroyUnreferencedCheckbox = me.lookupReference('destroyUnreferencedCheckbox');
42 me.params["destroy-unreferenced-disks"] = destroyUnreferencedCheckbox.checked ? 1 : 0;
43
44 return me.callParent();
45 },
46 });