Repository: cloudstack Updated Branches: refs/heads/master 307751083 -> 9f38fd6c9
CLOUDSTACK-6725: [OVS][UI] vm deployment wizard does not show all available zones in a region while deploying vm in a Regionlevel vpc Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9f38fd6c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9f38fd6c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9f38fd6c Branch: refs/heads/master Commit: 9f38fd6c9f61c5ef7a576a19cfbaaa5ddc689988 Parents: 3077510 Author: Gabor Apati-Nagy <gabor.apati-n...@citrix.com> Authored: Mon Jun 2 16:25:51 2014 +0100 Committer: Brian Federle <brian.fede...@citrix.com> Committed: Thu Sep 11 12:00:42 2014 -0700 ---------------------------------------------------------------------- ui/scripts/instanceWizard.js | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9f38fd6c/ui/scripts/instanceWizard.js ---------------------------------------------------------------------- diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js index 6708330..97a039b 100644 --- a/ui/scripts/instanceWizard.js +++ b/ui/scripts/instanceWizard.js @@ -77,19 +77,23 @@ steps: [ // Step 1: Setup function(args) { - if (args.initArgs.pluginForm != null && args.initArgs.pluginForm.name == "vpcTierInstanceWizard") { //from VPC Tier chart - //populate only one zone to the dropdown, the zone which the VPC is under. - zoneObjs = [{ - id: args.context.vpc[0].zoneid, - name: args.context.vpc[0].zonename, - networktype: 'Advanced' - }]; - args.response.success({ - data: { - zones: zoneObjs - } - }); - } else { //from Instance page + //from VPC Tier chart -- when the tier (network) has strechedl2subnet==false: + //only own zone is populated to the dropdown + if (args.initArgs.pluginForm != null && args.initArgs.pluginForm.name == "vpcTierInstanceWizard" + && args.context.networks[0].strechedl2subnet) { + zoneObjs = [{ + id: args.context.vpc[0].zoneid, + name: args.context.vpc[0].zonename, + networktype: 'Advanced' + }]; + args.response.success({ + data: { + zones: zoneObjs + } + }); + } + //in all other cases (as well as from instance page) all zones are populated to dropdown + else { $.ajax({ url: createURL("listZones&available=true"), dataType: "json",