From 799ff32c300823da64d4c78d61e219252d74da67 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Fri, 27 Apr 2012 16:16:40 -0700 Subject: [PATCH] cloudstack 3.0 UI - add network offering - fix a bug that wrongly calculated advanced zones. --- ui/scripts/configuration.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index 6a7b4f90055..512ece93587 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -1027,11 +1027,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; + } } } });