0e587291d6529dcfd9a9c1404d2959f99722d223
render_mem_usage_percent() treated any value above 1 as a byte count and recalculated the percentage from 'mem' and 'maxmem'. But the memory usage ratio of a guest can legitimately exceed 1, for example when the reported usage is the host-side memory of the QEMU process, which includes its own overhead. In the reported case, 'mem' was 2222472192 with a 'maxmem' of 2147483648, so the ratio of about 1.035 got taken as bytes and the search and resource grids showed 0.0 % instead of 103.5 %. All users of the renderer now pass the usage as a ratio, so drop the bytes fallback and always render the value as percentage. Signed-off-by: Michal Fox <me@dualfroz.com>
Description
My contributions to proxmox-git/pve-manager: 31 commits
206 KiB
0 Stars
1 Watchers
0 Forks
Languages
JavaScript
64.8%
Perl
34.9%
Makefile
0.3%