CS-16407: cloudstack UI - Infrastructure page - total number of Virtual Routers should include both project type and account type.

This commit is contained in:
Jessica Wang 2012-09-27 12:12:40 -07:00 committed by Edison Su
parent 632494d4a3
commit a5f26969e5
1 changed files with 14 additions and 5 deletions

View File

@ -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)
}));
}
});
}
});
},