Skip to content

Commit e8b6c7b

Browse files
author
Jessica Wang
committed
CLOUDSTACK-2120: mixed zone management - UI: count total number of hosts based on selected option in zone type dropdown on top menu.
1 parent 5ce2890 commit e8b6c7b

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

‎ui/scripts/system.js‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,13 +246,19 @@
246246
},
247247

248248
hostCount: function(data) {
249+
var data2= {
250+
type: 'routing',
251+
page: 1,
252+
pagesize: 1 //specifying pagesize as 1 because we don't need any embedded objects to be returned here. The only thing we need from API response is "count" property.
253+
};
254+
if(cloudStack.context.zoneType != null && cloudStack.context.zoneType.length > 0) { //Basic type or Advanced type
255+
$.extend(data2, {
256+
zonetype: cloudStack.context.zoneType
257+
});
258+
}
249259
$.ajax({
250260
url: createURL('listHosts'),
251-
data: {
252-
type: 'routing',
253-
page: 1,
254-
pagesize: 1 //specifying pagesize as 1 because we don't need any embedded objects to be returned here. The only thing we need from API response is "count" property.
255-
},
261+
data: data2,
256262
success: function(json) {
257263
dataFns.primaryStorageCount($.extend(data, {
258264
hostCount: json.listhostsresponse.count ?

0 commit comments

Comments
 (0)