CLOUDSTACK-6031: UI > infrastructure > count > pass listAll=true to all listXXXXXXX API for counting resource.

This commit is contained in:
Jessica Wang 2014-02-05 14:09:27 -08:00
parent c2c7d33d8e
commit 75757e9425
1 changed files with 12 additions and 0 deletions

View File

@ -210,6 +210,11 @@
zoneCount: function (data) {
$.ajax({
url: createURL('listZones'),
data: {
listAll: true,
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.
},
success: function (json) {
dataFns.podCount($.extend(data, {
zoneCount: json.listzonesresponse.count ? json.listzonesresponse.count: 0,
@ -223,6 +228,7 @@
$.ajax({
url: createURL('listPods'),
data: {
listAll: true,
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.
},
@ -238,6 +244,7 @@
$.ajax({
url: createURL('listClusters'),
data: {
listAll: true,
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.
},
@ -261,6 +268,7 @@
hostCount: function (data) {
var data2 = {
type: 'routing',
listAll: true,
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.
};
@ -277,6 +285,7 @@
primaryStorageCount: function (data) {
var data2 = {
listAll: true,
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.
};
@ -294,6 +303,7 @@
secondaryStorageCount: function (data) {
var data2 = {
type: 'SecondaryStorage',
listAll: true,
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.
};
@ -312,6 +322,7 @@
$.ajax({
url: createURL('listSystemVms'),
data: {
listAll: true,
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.
},
@ -325,6 +336,7 @@
virtualRouterCount: function (data) {
var data2 = {
listAll: true,
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.
};