]> git.proxmox.com Git - proxmox-widget-toolkit.git/commit
StatusView: fix usage calculation for fields without valid values
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 10 Mar 2022 14:31:37 +0000 (15:31 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 26 Apr 2022 06:28:28 +0000 (08:28 +0200)
commit8315a642014a69554561ff930dd297a331c202b2
tree63768c90150a9e9c0cfcfabbfb42c0a82f22513d
parent5c7c81d39bc21283c7669f46d462fa28b608ae8d
StatusView: fix usage calculation for fields without valid values

Sometimes, total can be zero (e.g. for swap when it's not used), which
leads to the usage being NaN. This led to the progressbar not being
updated for InfoWidgets, leaving a spurious '0%' as text.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/panel/StatusView.js