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 C22421FF144 for ; Tue, 10 Mar 2026 10:28:12 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B1B3515E31; Tue, 10 Mar 2026 10:28:06 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 10 Mar 2026 10:27:33 +0100 Message-Id: Subject: Re: [yew-devel] [PATCH proxmox-yew-comp] fix: use IEC standared for showing the HD space From: "Shan Shaji" To: "Shan Shaji" , "Thomas Lamprecht" , "Yew framework devel list at Proxmox" X-Mailer: aerc 0.20.0 References: <20251219172031.288936-1-s.shaji@proxmox.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1773134820006 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.951 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.408 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.819 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.903 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: PYAEKD5VAFW6FGQBJBCMFFJ4FEPBFDPN X-Message-ID-Hash: PYAEKD5VAFW6FGQBJBCMFFJ4FEPBFDPN X-MailFrom: s.shaji@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: Yew framework devel list at Proxmox List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Ahh, sorry! Actually this got applied. I missed sending superseded for this= patch. https://lore.proxmox.com/yew-devel/mkgnf4mi.23pnmnzxvd400@proxmox.com/ On Tue Mar 10, 2026 at 10:02 AM CET, Shan Shaji wrote: > On Mon Mar 9, 2026 at 10:22 PM CET, Thomas Lamprecht wrote: >> Am 19.12.25 um 18:21 schrieb Shan Shaji: >>> The HD space was being showing in SI unit, However all other metrics >>> shown in the remote overview section were in IEC unit. Fixed it by >>> updating it to use the IEC unit. >> >> But we do favor base-10 units for storage sizes and IEC for memory (and >> bits for network traffic), so this would seem alright as is to me, or? > > Thank you Thomas. I was not aware about that. However, when i checked PV= E, > inside the summary section the HD space is shown in IEC unit. For PBS, th= e > HD space under dashboard is in base-10. As for PDM, under the remote dasb= oard > the "Host Storage used" is shown in IEC unit. I believe it's a bit incons= istent. > I am not sure if that's expected. Shall i make it consistent across the p= roducts as > you mentioned? > >>>=20 >>> Signed-off-by: Shan Shaji >>> --- >>> src/node_info.rs | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>>=20 >>> diff --git a/src/node_info.rs b/src/node_info.rs >>> index 0f8fcb5..ca656d0 100644 >>> --- a/src/node_info.rs >>> +++ b/src/node_info.rs >>> @@ -204,8 +204,8 @@ pub fn node_info(data: Option) -> Conta= iner { >>> .status(format!( >>> "{:.2}% ({} of {})", >>> fraction * 100.0, >>> - HumanByte::new_decimal(root_used as f64), >>> - HumanByte::new_decimal(root_total as f64), >>> + HumanByte::from(root_used), >>> + HumanByte::from(root_total), >>> )) >>> }) >>> .with_child({