]> git.proxmox.com Git - pve-manager-legacy.git/commit
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)
commitbe285dea6693ea1b433bac76a37d1746320985be
treeb6c85f54c65092e5810f7306e5eaace52aec8119
parentccba60877bcd2f6752b05bc129b9ed13c7e3fce1
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