From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 7F0439170E for ; Thu, 2 Feb 2023 11:23:01 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5652BA82C for ; Thu, 2 Feb 2023 11:22:31 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 2 Feb 2023 11:22:30 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 04B9D43B74 for ; Thu, 2 Feb 2023 11:22:30 +0100 (CET) Message-ID: <201a05ba-2cf0-ce6c-6947-a10088e3e9a2@proxmox.com> Date: Thu, 2 Feb 2023 11:22:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:110.0) Gecko/20100101 Thunderbird/110.0 Content-Language: en-GB, de-AT To: Proxmox VE development discussion , Dominik Csapak References: <20230201154917.1632212-1-d.csapak@proxmox.com> <20230201154917.1632212-3-d.csapak@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20230201154917.1632212-3-d.csapak@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.005 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.09 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH manager 1/3] ui: Utils: refactor refreshing the the resource store/tree X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2023 10:23:01 -0000 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 > --- > 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);