ui: datastore prune: support passing namespace

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-05-06 11:35:14 +02:00
parent 2f5417f845
commit 1baf9030ad
2 changed files with 19 additions and 1 deletions

View File

@ -382,6 +382,7 @@ Ext.define('PBS.DataStoreContent', {
items: [
{
xtype: 'pbsPruneInputPanel',
ns: view.namespace,
dryrun: true,
},
],

View File

@ -12,7 +12,16 @@ Ext.define('PBS.panel.PruneInputPanel', {
cbindData: function() {
let me = this;
me.isCreate = !!me.isCreate;
return {};
return {
ns: me.ns ?? '',
};
},
onGetValues: function(values) {
if (values.ns === '') {
delete values.ns;
}
return values;
},
column1: [
@ -78,6 +87,14 @@ Ext.define('PBS.panel.PruneInputPanel', {
disabled: '{!dryrun}',
},
},
{
xtype: 'proxmoxtextfield',
name: 'ns',
hidden: true,
cbind: {
value: '{ns}',
},
},
],
});