all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Erik Fastermann <e.fastermann@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Erik Fastermann <e.fastermann@proxmox.com>
Subject: [PATCH pve-manager v2 1/2] ui: dc summary: update node grid fields in a single set() call
Date: Tue, 28 Jul 2026 09:51:23 +0200	[thread overview]
Message-ID: <20260728075124.53626-2-e.fastermann@proxmox.com> (raw)
In-Reply-To: <20260728075124.53626-1-e.fastermann@proxmox.com>

Each set() call fires its own update event, so the grid redrew the row
once per field. Passing all fields as an object fires a single event
instead.

The commit() call only served to clear the dirty flag, which the
documented dirty option does directly, without emitting another update
event per row.

This is a refactor and should have no user-visible effect.

Signed-off-by: Erik Fastermann <e.fastermann@proxmox.com>
---
 www/manager6/dc/Summary.js | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/www/manager6/dc/Summary.js b/www/manager6/dc/Summary.js
index bf7e99c6..cd4749be 100644
--- a/www/manager6/dc/Summary.js
+++ b/www/manager6/dc/Summary.js
@@ -164,12 +164,16 @@ Ext.define('PVE.dc.Summary', {
 
                         if (gridstore.getById(data.id)) {
                             let griditem = gridstore.getById(data.id);
-                            griditem.set('cpuusage', data.cpu);
                             let max = data.maxmem || 1;
                             let val = data.mem || 0;
-                            griditem.set('memoryusage', val / max);
-                            griditem.set('uptime', data.uptime);
-                            griditem.commit(); // else the store marks the field as dirty
+                            griditem.set(
+                                {
+                                    cpuusage: data.cpu,
+                                    memoryusage: val / max,
+                                    uptime: data.uptime,
+                                },
+                                { dirty: false },
+                            );
                         }
                         break;
                     case 'storage': {
-- 
2.47.3




  reply	other threads:[~2026-07-28  7:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  7:51 [PATCH pve-manager v2 0/2] fix #7794: ui: dc summary: add per-node VM/CT count columns Erik Fastermann
2026-07-28  7:51 ` Erik Fastermann [this message]
2026-07-28  7:51 ` [PATCH pve-manager v2 2/2] " Erik Fastermann

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=20260728075124.53626-2-e.fastermann@proxmox.com \
    --to=e.fastermann@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