Skip to content

Commit 8a52397

Browse files
committed
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
1 parent 78e7985 commit 8a52397

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

ui/scripts/dashboard.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,24 @@
225225
$.ajax({
226226
url: createURL('listCapacity'),
227227
data: {
228-
sortBy: 'usage',
228+
listtopused: true,
229229
page: 1,
230-
pageSize: 5
230+
pagesize: 8
231231
},
232232
success: function(json) {
233233
var capacities = json.listcapacityresponse.capacity ?
234234
json.listcapacityresponse.capacity : [];
235235

236236
complete($.extend(data, {
237237
zoneCapacities: $.map(capacities, function(capacity) {
238+
if (capacity.podname) {
239+
capacity.zonename = capacity.zonename.concat('<br/>Pod: ' + capacity.podname);
240+
}
241+
242+
if (capacity.clustername) {
243+
capacity.zonename = capacity.zonename.concat('<br/>Cluster: ' + capacity.clustername);
244+
}
245+
238246
return {
239247
zoneID: capacity.zoneid, // Temporary fix for dashboard
240248
zoneName: capacity.zonename,

0 commit comments

Comments
 (0)