cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [cloudstack] branch master updated: CLOUDSTACK-10059: Dashboard ignores resource value that is less than 1%
Date Thu, 31 Aug 2017 14:12:03 GMT
This is an automated email from the ASF dual-hosted git repository.

bhaisaab pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
     new dfd01c99 CLOUDSTACK-10059: Dashboard ignores resource value that is less than 1%
dfd01c99 is described below

commit dfd01c99ef5c19596559b06ac4553ccd3e648172
Author: Nitin Kumar Maharana <nitinkumar.maharana@accelerite.com>
AuthorDate: Thu Aug 31 02:48:22 2017 +0530

    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 c2b0f30..a30e1cd 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)
                                         };

-- 
To stop receiving notification emails like this one, please contact
['"commits@cloudstack.apache.org" <commits@cloudstack.apache.org>'].

Mime
View raw message