mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Bug 13059: cast the long to float else the fraction would be 0 - java basics :).
Reviewed-By: Kishan
This commit is contained in:
parent
74ce678baf
commit
560d54a49c
@ -2018,7 +2018,7 @@ public class ManagementServerImpl implements ManagementServer {
|
||||
for (DataCenterVO dc : dcList) {
|
||||
CapacityVO capacity = _storageMgr.getSecondaryStorageUsedStats(null, dc.getId());
|
||||
if (capacity.getTotalCapacity() != 0) {
|
||||
capacity.setUsedPercentage(capacity.getUsedCapacity() / capacity.getTotalCapacity());
|
||||
capacity.setUsedPercentage((float)capacity.getUsedCapacity() / capacity.getTotalCapacity());
|
||||
} else {
|
||||
capacity.setUsedPercentage(0);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user