mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Show zone-specific data on dashboard
This commit is contained in:
parent
2778deacb6
commit
7249dc99a2
@ -194,6 +194,7 @@
|
|||||||
success: function(json) {
|
success: function(json) {
|
||||||
var cluster = json.listclustersresponse.cluster;
|
var cluster = json.listclustersresponse.cluster;
|
||||||
|
|
||||||
|
// Get cluster-level data
|
||||||
$(cluster).each(function() {
|
$(cluster).each(function() {
|
||||||
var cluster = this;
|
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
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user