]> git.proxmox.com Git - pve-manager.git/commit - www/manager6/Utils.js
fix 'NaN%' when max value is 0
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 12 Oct 2016 10:04:36 +0000 (12:04 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 19 Oct 2016 10:05:36 +0000 (12:05 +0200)
commitbab64974a5bebe9c72010046839078ec98a8938a
treecd5019ccb49571b8725e01350bf488e9ddde48e6
parentc15c61d3e800a810f61c0be183befaf8272ca005
fix 'NaN%' when max value is 0

when we get a max value of 0
(for example when a storage is not active)

the render function would show:
'NaN% (0B of 0B)'

because of a division by 0

this patch simply returns 'N/A' because
a max value of 0 should never be valid

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/manager6/Utils.js