You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/04/16 20:50:27 UTC

[16/50] [abbrv] git commit: updated refs/heads/ui-mixed-zone-management to 5891f09

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/ui-mixed-zone-management
Commit: e05defc0732541eba117909211e455ecb6ac8b23
Parents: 0abfe24
Author: Pranav Saxena <pr...@citrix.com>
Authored: Mon Apr 15 12:38:18 2013 +0530
Committer: Pranav Saxena <pr...@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);