bug 13059: Dashboard UI

-Use new API param 'listtopused' to get all capacities

-As new API includes pod, cluster-level capacities, restore display of pod and cluster names on capacity label

-Increase page size to 8, to fit into UI better
This commit is contained in:
bfederle 2012-02-08 10:10:29 -08:00
parent 78e79856af
commit 8a523970b1
1 changed files with 10 additions and 2 deletions

View File

@ -225,9 +225,9 @@
$.ajax({
url: createURL('listCapacity'),
data: {
sortBy: 'usage',
listtopused: true,
page: 1,
pageSize: 5
pagesize: 8
},
success: function(json) {
var capacities = json.listcapacityresponse.capacity ?
@ -235,6 +235,14 @@
complete($.extend(data, {
zoneCapacities: $.map(capacities, function(capacity) {
if (capacity.podname) {
capacity.zonename = capacity.zonename.concat('<br/>Pod: ' + capacity.podname);
}
if (capacity.clustername) {
capacity.zonename = capacity.zonename.concat('<br/>Cluster: ' + capacity.clustername);
}
return {
zoneID: capacity.zoneid, // Temporary fix for dashboard
zoneName: capacity.zonename,