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 6C0341FF136 for ; Mon, 09 Mar 2026 22:23:25 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 80987B692; Mon, 9 Mar 2026 22:23:18 +0100 (CET) Message-ID: Date: Mon, 9 Mar 2026 22:22:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [yew-devel] [PATCH proxmox-yew-comp] fix: use IEC standared for showing the HD space To: Yew framework devel list at Proxmox , Shan Shaji References: <20251219172031.288936-1-s.shaji@proxmox.com> Content-Language: en-US From: Thomas Lamprecht In-Reply-To: <20251219172031.288936-1-s.shaji@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1773091331794 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.016 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: 7OFT4DVITHSADEVVUZKNF4Y2DXFAZK2S X-Message-ID-Hash: 7OFT4DVITHSADEVVUZKNF4Y2DXFAZK2S X-MailFrom: t.lamprecht@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: 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? > > Signed-off-by: Shan Shaji > --- > src/node_info.rs | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > 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) -> Container { > .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({