mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2120: mixed zone management - UI: count total number of Primary Storages, Secondary Storages based on selected option in zone type dropdown on top menu.
This commit is contained in:
parent
880f98c023
commit
f883b0f904
|
|
@ -269,29 +269,40 @@
|
|||
},
|
||||
|
||||
primaryStorageCount: function(data) {
|
||||
var data2 = {
|
||||
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('listStoragePools'),
|
||||
data: {
|
||||
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.secondaryStorageCount($.extend(data, {
|
||||
primaryStorageCount: json.liststoragepoolsresponse.count ?
|
||||
json.liststoragepoolsresponse.count : 0
|
||||
dataFns.secondaryStorageCount($.extend(data, {
|
||||
primaryStorageCount: json.liststoragepoolsresponse.count ? json.liststoragepoolsresponse.count : 0
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
secondaryStorageCount: function(data) {
|
||||
var data2 = {
|
||||
type: 'SecondaryStorage',
|
||||
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: 'SecondaryStorage',
|
||||
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.systemVmCount($.extend(data, {
|
||||
secondaryStorageCount: json.listhostsresponse.count ?
|
||||
|
|
|
|||
Loading…
Reference in New Issue