From dfd01c99ef5c19596559b06ac4553ccd3e648172 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Maharana Date: Thu, 31 Aug 2017 02:48:22 +0530 Subject: [PATCH] CLOUDSTACK-10059: Dashboard ignores resource value that is less than 1% Root Cause: The API returns the percentage value as floating point number but In UI it is converted to floor value of that number. Hence for values less than 1%, the value is being converted to 0% and it doesn't show the value in the UI. Solution: Removed the conversion, now it represents as it is(Floating point value). --- ui/scripts/dashboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/scripts/dashboard.js b/ui/scripts/dashboard.js index c2b0f309368..a30e1cd9c2d 100644 --- a/ui/scripts/dashboard.js +++ b/ui/scripts/dashboard.js @@ -267,7 +267,7 @@ zoneID: capacity.zoneid, // Temporary fix for dashboard zoneName: capacity.zonename, type: cloudStack.converters.toCapacityCountType(capacity.type), - percent: parseInt(capacity.percentused), + percent: capacity.percentused, used: cloudStack.converters.convertByType(capacity.type, capacity.capacityused), total: cloudStack.converters.convertByType(capacity.type, capacity.capacitytotal) };