* [PATCH proxmox-backup] ui: datastore content: allow moving namespace from parent
@ 2026-08-31 11:35 Dominik Csapak
2026-08-31 12:05 ` Jonas Theisen
2026-08-31 12:25 ` superseded: " Dominik Csapak
0 siblings, 2 replies; 3+ messages in thread
From: Dominik Csapak @ 2026-08-31 11:35 UTC (permalink / raw)
To: pbs-devel
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 <d.csapak@proxmox.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH proxmox-backup] ui: datastore content: allow moving namespace from parent
2026-08-31 11:35 [PATCH proxmox-backup] ui: datastore content: allow moving namespace from parent Dominik Csapak
@ 2026-08-31 12:05 ` Jonas Theisen
2026-08-31 12:25 ` superseded: " Dominik Csapak
1 sibling, 0 replies; 3+ messages in thread
From: Jonas Theisen @ 2026-08-31 12:05 UTC (permalink / raw)
To: pbs-devel
On 8/31/26 13:35, Dominik Csapak wrote:
> 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 <d.csapak@proxmox.com>
>
> -snip-
Tested the patch by creating and moving Namespaces from the
parent and sub level. Works as expected.
With the patch applied the Root entry of a Namespace also has
a move button and it references the current Namespace.
This is probably not intentional and could cause confusion.
--
Tested-By: Jonas Theisen <j.theisen@proxmox.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* superseded: [PATCH proxmox-backup] ui: datastore content: allow moving namespace from parent
2026-08-31 11:35 [PATCH proxmox-backup] ui: datastore content: allow moving namespace from parent Dominik Csapak
2026-08-31 12:05 ` Jonas Theisen
@ 2026-08-31 12:25 ` Dominik Csapak
1 sibling, 0 replies; 3+ messages in thread
From: Dominik Csapak @ 2026-08-31 12:25 UTC (permalink / raw)
To: pbs-devel
superseded by v2:
https://lore.proxmox.com/pbs-devel/20260831122443.2952899-1-d.csapak@proxmox.com/T/#u
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-31 12:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 11:35 [PATCH proxmox-backup] ui: datastore content: allow moving namespace from parent Dominik Csapak
2026-08-31 12:05 ` Jonas Theisen
2026-08-31 12:25 ` superseded: " Dominik Csapak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox