public inbox for yew-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [yew-devel] [PATCH proxmox-yew-comp] fix: use IEC standared for showing the HD space
@ 2025-12-19 17:20 Shan Shaji
  2026-03-09 21:22 ` Thomas Lamprecht
  0 siblings, 1 reply; 4+ messages in thread
From: Shan Shaji @ 2025-12-19 17:20 UTC (permalink / raw)
  To: yew-devel

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.

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
 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<NodeStatus>) -> 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({
-- 
2.47.3



_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yew-devel] [PATCH proxmox-yew-comp] fix: use IEC standared for showing the HD space
  2025-12-19 17:20 [yew-devel] [PATCH proxmox-yew-comp] fix: use IEC standared for showing the HD space Shan Shaji
@ 2026-03-09 21:22 ` Thomas Lamprecht
  2026-03-10  9:02   ` Shan Shaji
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Lamprecht @ 2026-03-09 21:22 UTC (permalink / raw)
  To: Yew framework devel list at Proxmox, Shan Shaji

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 <s.shaji@proxmox.com>
> ---
>  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<NodeStatus>) -> 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({





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yew-devel] [PATCH proxmox-yew-comp] fix: use IEC standared for showing the HD space
  2026-03-09 21:22 ` Thomas Lamprecht
@ 2026-03-10  9:02   ` Shan Shaji
  2026-03-10  9:27     ` Shan Shaji
  0 siblings, 1 reply; 4+ messages in thread
From: Shan Shaji @ 2026-03-10  9:02 UTC (permalink / raw)
  To: Thomas Lamprecht, Yew framework devel list at Proxmox

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 dasboard
the "Host Storage used" is shown in IEC unit. I believe it's a bit inconsistent.
I am not sure if that's expected. Shall i make it consistent across the products as
you mentioned?

>> 
>> Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
>> ---
>>  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<NodeStatus>) -> 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({





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yew-devel] [PATCH proxmox-yew-comp] fix: use IEC standared for showing the HD space
  2026-03-10  9:02   ` Shan Shaji
@ 2026-03-10  9:27     ` Shan Shaji
  0 siblings, 0 replies; 4+ messages in thread
From: Shan Shaji @ 2026-03-10  9:27 UTC (permalink / raw)
  To: Shan Shaji, Thomas Lamprecht, Yew framework devel list at Proxmox

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 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 dasboard
> the "Host Storage used" is shown in IEC unit. I believe it's a bit inconsistent.
> I am not sure if that's expected. Shall i make it consistent across the products as
> you mentioned?
>
>>> 
>>> Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
>>> ---
>>>  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<NodeStatus>) -> 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({





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-10  9:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-19 17:20 [yew-devel] [PATCH proxmox-yew-comp] fix: use IEC standared for showing the HD space Shan Shaji
2026-03-09 21:22 ` Thomas Lamprecht
2026-03-10  9:02   ` Shan Shaji
2026-03-10  9:27     ` Shan Shaji

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal