cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject git commit: updated refs/heads/master to e05defc
Date Mon, 15 Apr 2013 07:24:51 GMT
Updated Branches:
  refs/heads/master 0abfe240c -> e05defc07


CLOUDSTACK-1984:Wrong mapping of resource names to the capacity function on the dashboard


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e05defc0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e05defc0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e05defc0

Branch: refs/heads/master
Commit: e05defc0732541eba117909211e455ecb6ac8b23
Parents: 0abfe24
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Mon Apr 15 12:38:18 2013 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Mon Apr 15 12:38:18 2013 +0530

----------------------------------------------------------------------
 ui/scripts/dashboard.js       |    2 +-
 ui/scripts/sharedFunctions.js |   25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e05defc0/ui/scripts/dashboard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/dashboard.js b/ui/scripts/dashboard.js
index 845ae52..e8ab6c5 100644
--- a/ui/scripts/dashboard.js
+++ b/ui/scripts/dashboard.js
@@ -238,7 +238,7 @@
                     return {
                       zoneID: capacity.zoneid, // Temporary fix for dashboard
                       zoneName: capacity.zonename,
-                      type: cloudStack.converters.toAlertType(capacity.type),
+                      type: cloudStack.converters.toCapacityCountType(capacity.type),
                       percent: parseInt(capacity.percentused),
                       used: cloudStack.converters.convertByType(capacity.type, capacity.capacityused),
                       total: cloudStack.converters.convertByType(capacity.type, capacity.capacitytotal)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e05defc0/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index 86fe7f6..19e1611 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -425,6 +425,31 @@ cloudStack.converters = {
     case 26 : return "Resource Limit Exceeded";
     }
   },
+
+  toCapacityCountType:function(capacityCode){
+   switch(capacityCode){
+    case 0 : return _l('label.memory');
+    case 1 : return _l('label.cpu');
+    case 2 : return _l('label.storage');
+    case 3 : return _l('label.primary.storage');
+    case 4 : return _l('label.public.ips');
+    case 5 : return _l('label.management.ips');
+    case 6 : return _l('label.secondary.storage');
+    case 7 : return _l('label.vlan');
+    case 8 : return _l('label.direct.ips');
+    case 9 : return _l('label.local.storage');
+    case 10 : return "Routing Host";
+    case 11 : return "Storage";
+    case 12 : return "Usage Server";
+    case 13 : return "Management Server";
+    case 14 : return "Domain Router";
+    case 15 : return "Console Proxy";
+    case 16 : return "User VM";
+    case 17 : return "VLAN";
+    case 18 : return "Secondary Storage VM";
+      }
+    },
+
   convertByType: function(alertCode, value) {
     switch(alertCode) {
       case 0: return cloudStack.converters.convertBytes(value);


Mime
View raw message