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.
This commit is contained in:
committed by
Dietmar Maurer
parent
e968c5da43
commit
a9ef8ffb16
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user