diff --git a/ui/scripts/dashboard.js b/ui/scripts/dashboard.js index 9892e0d3aae..e9f716b07ba 100644 --- a/ui/scripts/dashboard.js +++ b/ui/scripts/dashboard.js @@ -194,6 +194,7 @@ success: function(json) { var cluster = json.listclustersresponse.cluster; + // Get cluster-level data $(cluster).each(function() { var cluster = this; @@ -205,6 +206,21 @@ })); }); }); + + // Get zone-level data + $(zone.capacity).each(function() { + var capacity = this; + var existingCapacityTypes = $.map(zoneCapacities, function(capacity) { + return capacity.type; + }); + var isExistingCapacity = $.inArray(capacity.type, existingCapacityTypes) > -1; + + if (!isExistingCapacity) { + zoneCapacities.push($.extend(capacity, { + zoneName: zone.name + })); + } + }); } }); });