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 B2D571FF144 for ; Tue, 10 Mar 2026 10:02:13 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A83221473F; Tue, 10 Mar 2026 10:02:07 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 10 Mar 2026 10:02:00 +0100 Message-Id: Subject: Re: [yew-devel] [PATCH proxmox-yew-comp] fix: use IEC standared for showing the HD space From: "Shan Shaji" To: "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: 1773133287566 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.114 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 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: SWG4JPQ4DT2BKNXBW7BBLPHTVKXF5VCY X-Message-ID-Hash: SWG4JPQ4DT2BKNXBW7BBLPHTVKXF5VCY 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: 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 PVE, inside the summary section the HD space is shown in IEC unit. For PBS, the HD space under dashboard is in base-10. As for PDM, under the remote dasboa= rd the "Host Storage used" is shown in IEC unit. I believe it's a bit inconsis= tent. I am not sure if that's expected. Shall i make it consistent across the pro= ducts 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) -> Contai= ner { >> .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({