netbox icon indicating copy to clipboard operation
netbox copied to clipboard

15873 - Make Cluster resource counters more readable

Open Julio-Oliveira-Encora opened this issue 9 months ago • 1 comments

Fixes: #15873

One method was created to normalize the VM's disk and memory sizes according to their units. That method is applied when the "Allocated Resources" is generated.

Julio-Oliveira-Encora avatar Apr 30 '24 18:04 Julio-Oliveira-Encora

I was analyzing it, and there is no point in trying to convert and predict any incorrect input from the customer. The "memory" field in the VM is already informed that the value must be in MB, so if the client enters, for example, the value "68000" for one VM and "64" for another, the result of the sum will be "68064 ", but this is not Netbox's "fault", but rather the incorrect input.

I think we should talk about it.

I changed "humanize_megabytes" to convert non-divisible values to 1024 in this commit and reverted all previous changes.

Screenshot from 2024-05-09 16-16-17

DO-AMS3

Julio-Oliveira-Encora avatar May 09 '24 19:05 Julio-Oliveira-Encora

@arthanson I'll leave to this to you for review.

jeremystretch avatar May 29 '24 14:05 jeremystretch

@arthanson, should we also do the same for the disk?

Julio-Oliveira-Encora avatar Jun 03 '24 14:06 Julio-Oliveira-Encora

actually never-mind about the disk, there is a 4.1 issue #14692 where we need to change the data-field anyways, so will do it there.

arthanson avatar Jun 04 '24 17:06 arthanson