pve-manager/www/manager6/window/SafeDestroyStorage.js
Fabian Ebner bccfb43f9f ui: node: storage removal: add checkbox for cleaning up disks
and factor out a SafeDestroyStorage sub-class to avoid duplication.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-11-10 14:03:27 +01:00

32 lines
712 B
JavaScript

/*
* SafeDestroy window with additional checkboxes for removing a storage on the disk level.
*/
Ext.define('PVE.window.SafeDestroyStorage', {
extend: 'Proxmox.window.SafeDestroy',
alias: 'widget.pveSafeDestroyStorage',
showProgress: true,
additionalItems: [
{
xtype: 'proxmoxcheckbox',
name: 'wipeDisks',
reference: 'wipeDisksCheckbox',
boxLabel: gettext('Cleanup Disks'),
checked: true,
autoEl: {
tag: 'div',
'data-qtip': gettext('Wipe labels and other left-overs'),
},
},
],
getParams: function() {
let me = this;
me.params['cleanup-disks'] = me.lookupReference('wipeDisksCheckbox').checked ? 1 : 0;
return me.callParent();
},
});