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: [ items: [
{ {
xtype: 'pbsPruneInputPanel', xtype: 'pbsPruneInputPanel',
ns: view.namespace,
dryrun: true, dryrun: true,
}, },
], ],

View File

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