From a9ef8ffb16e24c8e0e956e4333db01c69b876ff5 Mon Sep 17 00:00:00 2001 From: Wolfgang Link Date: Mon, 26 Sep 2016 12:12:47 +0200 Subject: [PATCH] Avoid JavaScript gets a string 0. If the JavaScript gets a "0" it convents it to a boolean false. So to ensure the GUI always get valid int we cast the values. --- PVE/Storage.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index f809762..ff43b17 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -1059,9 +1059,9 @@ sub storage_info { eval { ($total, $avail, $used, $active) = $plugin->status($storeid, $scfg, $cache); }; warn $@ if $@; next if !$active; - $info->{$storeid}->{total} = $total; - $info->{$storeid}->{avail} = $avail; - $info->{$storeid}->{used} = $used; + $info->{$storeid}->{total} = int ($total); + $info->{$storeid}->{avail} = int ($avail); + $info->{$storeid}->{used} = int ($used); $info->{$storeid}->{active} = $active; }