From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id B4CC31FF13A for ; Wed, 15 Apr 2026 14:20:47 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 60A3012B47; Wed, 15 Apr 2026 14:20:47 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 15 Apr 2026 14:20:13 +0200 Message-Id: Subject: Re: [PATCH datacenter-manager v3 10/11] ui: node status: add RRD graphs for PDM host metrics From: "Lukas Wagner" To: "Shannon Sterz" , "Lukas Wagner" , X-Mailer: aerc 0.21.0-0-g5549850facc2-dirty References: <20260413085816.143591-1-l.wagner@proxmox.com> <20260413085816.143591-11-l.wagner@proxmox.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1776255536509 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.053 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. 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: B2FMYJXT6IM2GIV43Y2IYLIDE7K2E6CX X-Message-ID-Hash: B2FMYJXT6IM2GIV43Y2IYLIDE7K2E6CX 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 Wed Apr 15, 2026 at 10:47 AM CEST, Shannon Sterz wrote: > On Mon Apr 13, 2026 at 10:58 AM CEST, Lukas Wagner wrote: > > thanks for these helpers and the follow-up patch using them throughout > pdm. i think they might make more sense in proxmox-yew-comp, though. we > tend to implement more or less the same types of rrd charts across our > products, so having them there is likely to come in handy again. what do > you think? > Yeah, that makes sense, thanks for the hint! I'll send a v4 with these moved to yew-comp. >> + /// Render CPU usage in percent. `v` is multiplied by 100 to get th= e percent value. >> + pub fn render_cpu_usage(v: &f64) -> String { >> + if v.is_finite() { >> + format!("{:.1}%", v * 100.0) >> + } else { >> + v.to_string() >> + } >> + } >> + >> + /// Render server load value. >> + pub fn render_load(v: &f64) -> String { >> + if v.is_finite() { >> + format!("{:.2}", v) >> + } else { >> + v.to_string() >> + } >> + } >> + >> + /// Render a byte value. >> + pub fn render_bytes(v: &f64) -> String { >> + if v.is_finite() { >> + proxmox_human_byte::HumanByte::from(*v as u64).to_string() >> + } else { >> + v.to_string() >> + } >> + } >> + >> + /// Render bandwidth. >> + pub fn render_bandwidth(v: &f64) -> String { >> + if v.is_finite() { >> + let bytes =3D proxmox_human_byte::HumanByte::from(*v as u64= ); >> + format!("{bytes}/s") >> + } else { >> + v.to_string() >> + } >> + } >> + >> + /// Render pressure stall value. >> + pub fn render_pressure(v: &f64) -> String { >> + if v.is_finite() { >> + format!("{:.1}%", v) >> + } else { >> + v.to_string() >> + } >> + } >> +}