From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 351C71FF09B for ; Mon, 31 Aug 2026 13:35:44 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id C2686203BE; Mon, 31 Aug 2026 13:35:43 +0200 (CEST) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup] ui: datastore content: allow moving namespace from parent Date: Mon, 31 Aug 2026 13:35:32 +0200 Message-ID: <20260831113539.2622191-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.655 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: OZQZU5RUGNSOQO73IN4QNU2ZODUVE2CO X-Message-ID-Hash: OZQZU5RUGNSOQO73IN4QNU2ZODUVE2CO X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: having to go into the namespace to move it seems unintuitive, so allow it from it's parent too. Only navigate to the new place when we were inside the namespace, otherwise we stay at the one we were. Signed-off-by: Dominik Csapak --- www/datastore/Content.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/www/datastore/Content.js b/www/datastore/Content.js index bd989e660..2b93d19a4 100644 --- a/www/datastore/Content.js +++ b/www/datastore/Content.js @@ -670,17 +670,20 @@ Ext.define('PBS.DataStoreContent', { }); }, - moveNS: function () { + moveNS: function (data) { let me = this; let view = me.getView(); - if (!view.namespace || view.namespace === '') { + + let namespace = data.ns || view.namespace; + if (!namespace) { return; } + let insideNs = !!view.namespace; let win = Ext.create('PBS.window.NamespaceMove', { datastore: view.datastore, - namespace: view.namespace, + namespace, taskDone: (success) => { - if (success) { + if (success && insideNs) { let newNs = win.getNewNamespace(); // update view.namespace and reload the content grid directly rather than // going through the NS selector's change event, which may not fire if the @@ -718,7 +721,7 @@ Ext.define('PBS.DataStoreContent', { if (data.ty === 'group') { me.moveGroup(data); } else if (data.ty === 'ns') { - me.moveNS(); + me.moveNS(data); } }, @@ -1154,7 +1157,7 @@ Ext.define('PBS.DataStoreContent', { if (data.ty === 'group') { return 'fa fa-arrows'; } - if (data.ty === 'ns' && !data.isRootNS && data.ns === undefined) { + if (data.ty === 'ns' && !data.isRootNS) { return 'fa fa-arrows'; } return 'pmx-hidden'; @@ -1163,7 +1166,7 @@ Ext.define('PBS.DataStoreContent', { if (data.ty === 'group') { return false; } - if (data.ty === 'ns' && !data.isRootNS && data.ns === undefined) { + if (data.ty === 'ns' && !data.isRootNS) { return false; } return true; -- 2.47.3