From 1baf9030adbe03cab75245b79d37ed7c6becaccc Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 6 May 2022 11:35:14 +0200 Subject: [PATCH] ui: datastore prune: support passing namespace Signed-off-by: Thomas Lamprecht --- www/datastore/Content.js | 1 + www/window/DataStoreEdit.js | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/www/datastore/Content.js b/www/datastore/Content.js index 6d942288..636f1c91 100644 --- a/www/datastore/Content.js +++ b/www/datastore/Content.js @@ -382,6 +382,7 @@ Ext.define('PBS.DataStoreContent', { items: [ { xtype: 'pbsPruneInputPanel', + ns: view.namespace, dryrun: true, }, ], diff --git a/www/window/DataStoreEdit.js b/www/window/DataStoreEdit.js index ed23ad11..f2e1ba7f 100644 --- a/www/window/DataStoreEdit.js +++ b/www/window/DataStoreEdit.js @@ -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}', + }, + }, ], });