mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2120: mixed zone management - UI: count total number of hosts based on selected option in zone type dropdown on top menu.
This commit is contained in:
parent
5ce289034d
commit
e8b6c7b33d
|
|
@ -246,13 +246,19 @@
|
|||
},
|
||||
|
||||
hostCount: function(data) {
|
||||
var data2= {
|
||||
type: 'routing',
|
||||
page: 1,
|
||||
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.
|
||||
};
|
||||
if(cloudStack.context.zoneType != null && cloudStack.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
$.extend(data2, {
|
||||
zonetype: cloudStack.context.zoneType
|
||||
});
|
||||
}
|
||||
$.ajax({
|
||||
url: createURL('listHosts'),
|
||||
data: {
|
||||
type: 'routing',
|
||||
page: 1,
|
||||
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.
|
||||
},
|
||||
data: data2,
|
||||
success: function(json) {
|
||||
dataFns.primaryStorageCount($.extend(data, {
|
||||
hostCount: json.listhostsresponse.count ?
|
||||
|
|
|
|||
Loading…
Reference in New Issue