From a5f26969e5166e703db028b87433551271af60d0 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 27 Sep 2012 12:12:40 -0700 Subject: [PATCH] CS-16407: cloudstack UI - Infrastructure page - total number of Virtual Routers should include both project type and account type. --- ui/scripts/system.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 37592294fac..7b242bc45ad 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -273,13 +273,22 @@ $.ajax({ url: createURL('listRouters'), data: { - listAll: true + projectid: -1 }, success: function(json) { - dataFns.capacity($.extend(data, { - virtualRouterCount: json.listroutersresponse.count ? - json.listroutersresponse.count : 0 - })); + var total1 = json.listroutersresponse.count ? json.listroutersresponse.count : 0; + $.ajax({ + url: createURL('listRouters'), + data: { + listAll: true + }, + success: function(json) { + var total2 = json.listroutersresponse.count ? json.listroutersresponse.count : 0; + dataFns.capacity($.extend(data, { + virtualRouterCount: (total1 + total2) + })); + } + }); } }); },