From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 009341FF0DF for ; Fri, 28 Aug 2026 14:55:53 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 53F65214DD; Fri, 28 Aug 2026 14:55:53 +0200 (CEST) Content-Type: text/plain; charset=UTF-8 Date: Fri, 28 Aug 2026 14:55:48 +0200 Message-Id: Subject: Re: [PATCH datacenter-manager v3 8/9] ui: pve: node selector: show maintenance badge with node name From: "Lukas Wagner" To: "Dominik Csapak" , Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: aerc 0.21.0-0-g5549850facc2-dirty References: <20260821123201.3035643-1-d.csapak@proxmox.com> <20260821123201.3035643-9-d.csapak@proxmox.com> In-Reply-To: <20260821123201.3035643-9-d.csapak@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787921739417 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.559 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: AQRMDKPYTZJSENKBITGN3NUYRYYYFMSC X-Message-ID-Hash: AQRMDKPYTZJSENKBITGN3NUYRYYYFMSC X-MailFrom: l.wagner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri Aug 21, 2026 at 2:30 PM CEST, Dominik Csapak wrote: > columns.push( > DataTableColumn::new(tr!("Memory Usage")) > - .render( > - |entry: &ClusterNodeIndexResponse| match (entry.mem,= entry.maxmem) { > - (Some(mem), Some(maxmem)) =3D> { > - html! {format!("{:.2}%", 100.0 * mem as f64 = / maxmem as f64)} > - } > - _ =3D> html! {}, > - }, > - ) > - .sorter( > - |a: &ClusterNodeIndexResponse, b: &ClusterNodeIndexR= esponse| a.mem.cmp(&b.mem), > - ) > + .render(|entry: &PveNodeResource| { > + // don't show values when the node isn't online or w= hen it's non sensible > + if entry.maxmem =3D=3D 0 || entry.status !=3D "onlin= e" { > + return html! {}; > + } > + html! {format!("{:.2}%", 100.0 * entry.mem as f64 / = entry.maxmem as f64)} > + }) > + .sorter(|a: &PveNodeResource, b: &PveNodeResource| a.mem= .cmp(&b.mem)) Pre-existing, so material for a follow-up patch, but I think this sorter should probably sort based on the shown percentage, not the absolute value? Otherwise sorting could pretty much appear random to the user, if the amount of total memory differs per node? > .into(), > ); > }