From a4c413bc13cae8d6060a4bfd58fb2d6a18bebbc7 Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Mon, 21 Jan 2013 14:30:56 -0800 Subject: [PATCH] CLOUDSTACK-537: Fix for instance wizard When using SG-enabled advanced zone, fix case where 'add guest network' form shows up in select network step -- adding a guest network via the wizard is not supported in this type of setup. --- ui/css/cloudstack3.css | 8 ++++++++ ui/scripts/instanceWizard.js | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css index 58563a6711a..db101d21ec4 100644 --- a/ui/css/cloudstack3.css +++ b/ui/css/cloudstack3.css @@ -5778,6 +5778,10 @@ label.error { height: 223px; } +.multi-wizard.instance-wizard .select-network.no-add-network .select table .select-container { + height: 282px; +} + .multi-wizard.instance-wizard .select-network .select.new-network table .select-container { height: 29px; overflow: visible; @@ -5802,6 +5806,10 @@ label.error { margin: -17px 0 0; } +.multi-wizard.instance-wizard .select-network.no-add-network .select.new-network { + display: none !important; +} + .multi-wizard.instance-wizard .select-network .main-desc { width: 252px; top: 12px; diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js index b98147b2056..f3fe6a53991 100644 --- a/ui/scripts/instanceWizard.js +++ b/ui/scripts/instanceWizard.js @@ -284,6 +284,7 @@ $networkStep.find("#from_instance_page_2").show(); $networkStep.find("#from_vpc_tier").text(""); $networkStep.find("#from_vpc_tier").hide(); + $networkStepContainer.removeClass('next-use-security-groups'); } else { // Advanced SG-enabled zone step5ContainerType = 'select-advanced-sg'; } @@ -384,8 +385,15 @@ }); //get network offerings (end) *** + $networkStepContainer.removeClass('repeat next-use-security-groups'); + if (step5ContainerType == 'select-advanced-sg') { $networkStepContainer.addClass('repeat next-use-security-groups'); + + // Add guest network is disabled + $networkStepContainer.find('.select-network').addClass('no-add-network'); + } else { + $networkStepContainer.find('.select-network').removeClass('no-add-network'); } args.response.success({