cloudstack 3.0 UI - add network offering - fix a bug that wrongly calculated advanced zones.

This commit is contained in:
Jessica Wang 2012-04-27 16:16:40 -07:00
parent 851ed411f7
commit 883a0f1bd9
1 changed files with 8 additions and 4 deletions

View File

@ -1026,11 +1026,15 @@
// Check whether there are any advanced zones
$.ajax({
url: createURL('listZones'),
data: { listAll: true, networktype: 'advanced' },
data: { listAll: true },
async: false,
success: function(json) {
if (json.listzonesresponse.zone && json.listzonesresponse.zone.length) {
hasAdvancedZones = true;
success: function(json) {
var zones = json.listzonesresponse.zone;
if (zones != null && zones.length > 0) {
for(var i = 0; i < zones.length; i++) {
if(zones[i].networktype == "Advanced")
hasAdvancedZones = true;
}
}
}
});