From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager 1/3] ui: Utils: refactor refreshing the the resource store/tree
Date: Thu, 2 Feb 2023 11:22:29 +0100 [thread overview]
Message-ID: <201a05ba-2cf0-ce6c-6947-a10088e3e9a2@proxmox.com> (raw)
In-Reply-To: <20230201154917.1632212-3-d.csapak@proxmox.com>
Am 01/02/2023 um 16:49 schrieb Dominik Csapak:
> we'll need it elsewhere too, and it was rather hidden in the
> updateTagSettings call.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> www/manager6/Utils.js | 3 +++
> www/manager6/dc/OptionView.js | 1 +
> 2 files changed, 4 insertions(+)
>
> diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
> index fcc668c3a..ee9e4bd5d 100644
> --- a/www/manager6/Utils.js
> +++ b/www/manager6/Utils.js
> @@ -1871,6 +1871,7 @@ Ext.define('PVE.Utils', {
>
> PVE.Utils.updateTagList(PVE.UIOptions['allowed-tags']);
> PVE.Utils.updateTagSettings(PVE.UIOptions?.['tag-style']);
> + PVE.Utils.fireUIUpdate();
> },
> });
> },
> @@ -1920,7 +1921,9 @@ Ext.define('PVE.Utils', {
> }
>
> Ext.ComponentQuery.query('pveResourceTree')[0].setUserCls(`proxmox-tags-${shape}`);
> + },
>
> + fireUIUpdate: function() {
naming is off for this as it uses the action desired (but that's not future proof)
instead of using the actual event being fired, e.g., do s/fireUIUpdate/fireUIConfigChange/
btw, utils _really_ is a convoluted mess that needs some basic cleanup rather sooner
than later...
> if (!PVE.data.ResourceStore.isLoading() && PVE.data.ResourceStore.isLoaded()) {
> PVE.data.ResourceStore.fireEvent('load');
> }
> diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc/OptionView.js
> index 9c803beef..2e4f76263 100644
> --- a/www/manager6/dc/OptionView.js
> +++ b/www/manager6/dc/OptionView.js
> @@ -566,6 +566,7 @@ Ext.define('PVE.dc.OptionView', {
>
> PVE.UIOptions['tag-style'] = store.getById('tag-style')?.data?.value;
> PVE.Utils.updateTagSettings(PVE.UIOptions['tag-style']);
> + PVE.Utils.fireUIUpdate();
> });
>
> me.on('activate', me.rstore.startUpdate);
next prev parent reply other threads:[~2023-02-02 10:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 15:49 [pve-devel] [PATCH cluster/manager] fix #1408: ui: make tree sorting configurable Dominik Csapak
2023-02-01 15:49 ` [pve-devel] [PATCH cluster 1/1] datacenter config: add options for sorting the gui tree Dominik Csapak
2023-02-01 15:49 ` [pve-devel] [PATCH manager 1/3] ui: Utils: refactor refreshing the the resource store/tree Dominik Csapak
2023-02-02 10:22 ` Thomas Lamprecht [this message]
2023-02-01 15:49 ` [pve-devel] [PATCH manager 2/3] ui: add TreeSortingEdit window Dominik Csapak
2023-02-02 10:56 ` Thomas Lamprecht
2023-02-02 12:16 ` Dominik Csapak
2023-02-01 15:49 ` [pve-devel] [PATCH manager 3/3] fix #1408: ui: ResourceTree: sort the tree according to tree-sorting options Dominik Csapak
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=201a05ba-2cf0-ce6c-6947-a10088e3e9a2@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=pve-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox