Skip to content

Commit 75757e9

Browse files
author
Jessica Wang
committed
CLOUDSTACK-6031: UI > infrastructure > count > pass listAll=true to all listXXXXXXX API for counting resource.
1 parent c2c7d33 commit 75757e9

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎ui/scripts/system.js‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@
210210
zoneCount: function (data) {
211211
$.ajax({
212212
url: createURL('listZones'),
213+
data: {
214+
listAll: true,
215+
page: 1,
216+
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.
217+
},
213218
success: function (json) {
214219
dataFns.podCount($.extend(data, {
215220
zoneCount: json.listzonesresponse.count ? json.listzonesresponse.count: 0,
@@ -223,6 +228,7 @@
223228
$.ajax({
224229
url: createURL('listPods'),
225230
data: {
231+
listAll: true,
226232
page: 1,
227233
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.
228234
},
@@ -238,6 +244,7 @@
238244
$.ajax({
239245
url: createURL('listClusters'),
240246
data: {
247+
listAll: true,
241248
page: 1,
242249
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.
243250
},
@@ -261,6 +268,7 @@
261268
hostCount: function (data) {
262269
var data2 = {
263270
type: 'routing',
271+
listAll: true,
264272
page: 1,
265273
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.
266274
};
@@ -277,6 +285,7 @@
277285

278286
primaryStorageCount: function (data) {
279287
var data2 = {
288+
listAll: true,
280289
page: 1,
281290
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.
282291
};
@@ -294,6 +303,7 @@
294303
secondaryStorageCount: function (data) {
295304
var data2 = {
296305
type: 'SecondaryStorage',
306+
listAll: true,
297307
page: 1,
298308
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.
299309
};
@@ -312,6 +322,7 @@
312322
$.ajax({
313323
url: createURL('listSystemVms'),
314324
data: {
325+
listAll: true,
315326
page: 1,
316327
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.
317328
},
@@ -325,6 +336,7 @@
325336

326337
virtualRouterCount: function (data) {
327338
var data2 = {
339+
listAll: true,
328340
page: 1,
329341
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.
330342
};

0 commit comments

Comments
 (0)