Show zone-specific data on dashboard

This commit is contained in:
bfederle 2012-01-04 08:48:31 -08:00
parent 2778deacb6
commit 7249dc99a2

View File

@ -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
}));
}
});
}
});
});