From 8a523970b16a33981b1e7e4f2bee5eebc6e3ee66 Mon Sep 17 00:00:00 2001 From: bfederle Date: Wed, 8 Feb 2012 10:10:29 -0800 Subject: [PATCH] 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 --- ui/scripts/dashboard.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ui/scripts/dashboard.js b/ui/scripts/dashboard.js index 5399d42fb8b..32e19658731 100644 --- a/ui/scripts/dashboard.js +++ b/ui/scripts/dashboard.js @@ -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('
Pod: ' + capacity.podname); + } + + if (capacity.clustername) { + capacity.zonename = capacity.zonename.concat('
Cluster: ' + capacity.clustername); + } + return { zoneID: capacity.zoneid, // Temporary fix for dashboard zoneName: capacity.zonename,