all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Filip Schauer <f.schauer@proxmox.com>
To: Dominik Csapak <d.csapak@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox-backup] ui: datastore content: fix namespace change after reload
Date: Tue, 28 Apr 2026 13:30:14 +0200	[thread overview]
Message-ID: <1caf3dc4-cc7e-4560-b37d-642cbd89a533@proxmox.com> (raw)
In-Reply-To: <20260428110520.2343917-1-d.csapak@proxmox.com>

On 28/04/2026 13:03, Dominik Csapak wrote:
> A double click on a namespace change it by first setting the namespace
> value to the namespace selector and then triggering a reload.
>
> When a new namespace is added to the view with a manual click on
> 'reload', this new namespace does not yet exist in the namespace
> selectors store. So a double click can't properly set this as a value,
> and thus does not change the namespace.
>
> To fix this, always reload the namespace selector at the beginning of a
> reload, so they should be in sync.
>
> To keep the callback we use for the namespace selector, move it to the
> reload function and pass it through to the load there.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>   www/datastore/Content.js | 11 +++++------
>   1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/www/datastore/Content.js b/www/datastore/Content.js
> index b1e1f66cb..293f9ca26 100644
> --- a/www/datastore/Content.js
> +++ b/www/datastore/Content.js
> @@ -102,8 +102,11 @@ Ext.define('PBS.DataStoreContent', {
>               this.reload();
>           },
>   
> -        reload: function () {
> +        reload: function (nsLoadCallback) {
>               let view = this.getView();
> +            view.down('pbsNamespaceSelector').store?.load({
> +                callback: Ext.isFunction(nsLoadCallback) ? nsLoadCallback : undefined,
> +            });
>   
>               if (!view.store || !this.store) {
>                   console.warn('cannot reload, no store(s)');
> @@ -560,7 +563,6 @@ Ext.define('PBS.DataStoreContent', {
>                   namespace: view.namespace ?? '',
>                   apiCallDone: (success) => {
>                       if (success) {
> -                        view.down('pbsNamespaceSelector').store?.load();
>                           me.reload();
>                       }
>                   },
> @@ -685,11 +687,8 @@ Ext.define('PBS.DataStoreContent', {
>                           // selector's tree store does not know about the just-created target
>                           // namespace yet.
>                           view.namespace = newNs;
> -                        me.reload();
>                           let selector = view.down('pbsNamespaceSelector');
> -                        selector?.store?.load({
> -                            callback: () => selector.setValue(newNs),
> -                        });
> +                        me.reload(() => selector.setValue(newNs));
>                       }
>                   },
>               });

I can confirm that this fixes the bug where, after a new namespace was
pushed to a datastore, it would appear in the content view when clicking
"Reload", but double-clicking it did nothing until the entire page was
refreshed. Now, this no longer happens, and I can immediately navigate
into the namespace.





  reply	other threads:[~2026-04-28 11:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-28 11:05 [PATCH proxmox-backup] ui: datastore content: fix namespace change after reload Dominik Csapak
2026-04-28 11:30 ` Filip Schauer [this message]
2026-04-28 13:14 ` applied: " Thomas Lamprecht

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=1caf3dc4-cc7e-4560-b37d-642cbd89a533@proxmox.com \
    --to=f.schauer@proxmox.com \
    --cc=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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal