all lists on lists.proxmox.com
 help / color / mirror / Atom feed
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 v2 2/2] ui: resource tree: only fire 'refresh' event when something changed
Date: Thu, 22 Jan 2026 16:31:48 +0100	[thread overview]
Message-ID: <d29eeb9e-64d0-4911-96e7-dbf0edd3f2fb@proxmox.com> (raw)
In-Reply-To: <20251212074419.275374-2-d.csapak@proxmox.com>

Am 12.12.25 um 08:44 schrieb Dominik Csapak:
> to optimize the rendering to the dom, only fire the 'refresh' event of
> the store at the end of the updateTree method when either:
> 
> * an element changed it's relevant data
> * something moved
> * a new element was inserted
> * an element was removed
> 
> We also need to refresh the store when the UI options are reloaded, so
> the tags get the correct color.
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> no changes in v2
> 
>  www/manager6/tree/ResourceTree.js | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/www/manager6/tree/ResourceTree.js b/www/manager6/tree/ResourceTree.js
> index b0e094f1..8612269b 100644
> --- a/www/manager6/tree/ResourceTree.js
> +++ b/www/manager6/tree/ResourceTree.js
> @@ -354,6 +354,7 @@ Ext.define('PVE.tree.ResourceTree', {
>          let updateTree = function () {
>              store.suspendEvents();
>  
> +            let any_changed = false;

existing style in this module is already rather mixed, so really not a big style issue,
but would be still nice to prefer camelCase as per our [JS style guide]. Also here,
would probably fixed that just up, but due to replying to patch 1/2 anyway I figured
it doesn't hurt to notice this nit.

JS style guide: https://pve.proxmox.com/wiki/Javascript_Style_Guide#Casing

>              let rootnode;
>              if (firstUpdate) {
>                  rootnode = Ext.create('PVETree', {



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2026-01-22 15:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-12  7:40 [pve-devel] [PATCH manager v2 1/2] ui: resource tree: use 'diskuse' instead of calculating everytime Dominik Csapak
2025-12-12  7:40 ` [pve-devel] [PATCH manager v2 2/2] ui: resource tree: only fire 'refresh' event when something changed Dominik Csapak
2026-01-22 15:31   ` Thomas Lamprecht [this message]
2026-01-22 14:04 ` [pve-devel] [PATCH manager v2 1/2] ui: resource tree: use 'diskuse' instead of calculating everytime Dominik Csapak
2026-01-22 15:19 ` Fiona Ebner
2026-01-22 15:25 ` Thomas Lamprecht
2026-01-22 15:28   ` Dominik Csapak
2026-01-23  8:15 ` [pve-devel] superseded: " 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=d29eeb9e-64d0-4911-96e7-dbf0edd3f2fb@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 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