|
203 | 203 | zoneCount: function(data) { |
204 | 204 | $.ajax({ |
205 | 205 | url: createURL('listZones'), |
| 206 | + data: { |
| 207 | + listAll: true, |
| 208 | + page: 1, |
| 209 | + 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. |
| 210 | + }, |
206 | 211 | success: function(json) { |
207 | 212 | dataFns.podCount($.extend(data, { |
208 | 213 | zoneCount: json.listzonesresponse.count ? json.listzonesresponse.count : 0, |
|
216 | 221 | $.ajax({ |
217 | 222 | url: createURL('listPods'), |
218 | 223 | data: { |
| 224 | + listAll: true, |
219 | 225 | page: 1, |
220 | 226 | 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. |
221 | 227 | }, |
|
231 | 237 | $.ajax({ |
232 | 238 | url: createURL('listClusters'), |
233 | 239 | data: { |
| 240 | + listAll: true, |
234 | 241 | page: 1, |
235 | 242 | 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. |
236 | 243 | }, |
|
254 | 261 | hostCount: function(data) { |
255 | 262 | var data2 = { |
256 | 263 | type: 'routing', |
| 264 | + listAll: true, |
257 | 265 | page: 1, |
258 | 266 | 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. |
259 | 267 | }; |
|
270 | 278 |
|
271 | 279 | primaryStorageCount: function(data) { |
272 | 280 | var data2 = { |
| 281 | + listAll: true, |
273 | 282 | page: 1, |
274 | 283 | 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. |
275 | 284 | }; |
|
287 | 296 | secondaryStorageCount: function(data) { |
288 | 297 | var data2 = { |
289 | 298 | type: 'SecondaryStorage', |
| 299 | + listAll: true, |
290 | 300 | page: 1, |
291 | 301 | 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. |
292 | 302 | }; |
|
305 | 315 | $.ajax({ |
306 | 316 | url: createURL('listSystemVms'), |
307 | 317 | data: { |
| 318 | + listAll: true, |
308 | 319 | page: 1, |
309 | 320 | 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. |
310 | 321 | }, |
|
318 | 329 |
|
319 | 330 | virtualRouterCount: function(data) { |
320 | 331 | var data2 = { |
| 332 | + listAll: true, |
321 | 333 | page: 1, |
322 | 334 | 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. |
323 | 335 | }; |
|
336 | 348 | if (cloudStack.context && cloudStack.context.projects == null) { //non-project view |
337 | 349 | var data3 = { |
338 | 350 | listAll: true, |
339 | | - projectid: -1, |
| 351 | + projectid: -1, |
340 | 352 | page: 1, |
341 | 353 | 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. |
342 | 354 | }; |
|
350 | 362 | }); |
351 | 363 | } |
352 | 364 |
|
353 | | - dataFns.capacity($.extend(data, { |
354 | | - virtualRouterCount: (total1 + total2) |
355 | | - })); |
356 | | - } |
357 | | - }); |
| 365 | + dataFns.capacity($.extend(data, { |
| 366 | + virtualRouterCount: (total1 + total2) |
| 367 | + })); |
| 368 | + } |
| 369 | + }); |
358 | 370 | }, |
359 | 371 |
|
360 | 372 | capacity: function(data) { |
|
0 commit comments