From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [RFC PATCH proxmox-backup] ui: datastore content: allow moving namespace from parent
Date: Tue, 28 Apr 2026 13:16:30 +0200 [thread overview]
Message-ID: <20260428111822.2471005-1-d.csapak@proxmox.com> (raw)
having to go into the namespace to move it seems unintuitive, so allow
it from it's parent too.
Since it touches the same lines, fix the formatting issue detected with
proxmox-biome.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
sending as RFC because it's not urgent and IMHO it's not clear how we
should behave after moving: when inside the namespace it's clear,
we change the current view to the new place.
But how should we handle it when we move it from the parent?
Should we navigate to the new parent? Or should we move inside the
new path (as it's currently handled) or should we stay on the same
namespace and not navigate away?
Would appreciate input on what users might expect here...
www/datastore/Content.js | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/www/datastore/Content.js b/www/datastore/Content.js
index 293f9ca26..dcaca4449 100644
--- a/www/datastore/Content.js
+++ b/www/datastore/Content.js
@@ -670,15 +670,17 @@ 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 win = Ext.create('PBS.window.NamespaceMove', {
datastore: view.datastore,
- namespace: view.namespace,
+ namespace,
taskDone: (success) => {
if (success) {
let newNs = win.getNewNamespace();
@@ -714,7 +716,7 @@ Ext.define('PBS.DataStoreContent', {
if (data.ty === 'group') {
me.moveGroup(data);
} else if (data.ty === 'ns') {
- me.moveNS();
+ me.moveNS(data);
}
},
@@ -1146,15 +1148,19 @@ Ext.define('PBS.DataStoreContent', {
return Ext.String.format(gettext("Move namespace '{0}'"), v);
},
getClass: (v, m, { data }) => {
- if (data.ty === 'group') { return 'fa fa-arrows'; }
- if (data.ty === 'ns' && !data.isRootNS && data.ns === undefined) {
+ if (data.ty === 'group') {
+ return 'fa fa-arrows';
+ }
+ if (data.ty === 'ns' && !data.isRootNS) {
return 'fa fa-arrows';
}
return 'pmx-hidden';
},
isActionDisabled: (v, r, c, i, { data }) => {
- if (data.ty === 'group') { return false; }
- if (data.ty === 'ns' && !data.isRootNS && data.ns === undefined) {
+ if (data.ty === 'group') {
+ return false;
+ }
+ if (data.ty === 'ns' && !data.isRootNS) {
return false;
}
return true;
--
2.47.3
reply other threads:[~2026-04-28 11:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260428111822.2471005-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.