ui: datastore/Content: add 'Prune All' button

since the api call always starts a real worker, we cannot have a
preview. It would also be very hard to show that for all groups in a
non-confusing way. We reuse the pbsPruneInputPanel and add the dry-run
field there conditionally.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2021-07-16 10:53:27 +02:00
committed by Dietmar Maurer
parent 9805207aa5
commit afbf2e10f3
2 changed files with 49 additions and 0 deletions

View File

@ -6,6 +6,9 @@ Ext.define('PBS.panel.PruneInputPanel', {
onlineHelp: 'maintenance_pruning',
// show/hide dry-run field
dryrun: false,
cbindData: function() {
let me = this;
me.isCreate = !!me.isCreate;
@ -65,6 +68,18 @@ Ext.define('PBS.panel.PruneInputPanel', {
},
],
columnB: [
{
xtype: 'proxmoxcheckbox',
name: 'dry-run',
fieldLabel: gettext('Dry Run'),
cbind: {
hidden: '{!dryrun}',
disabled: '{!dryrun}',
},
},
],
});
Ext.define('PBS.DataStoreEdit', {
extend: 'Proxmox.window.Edit',