From da20ee3c40ccb5b63af5df02257731eae112e947 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 22 May 2012 11:15:06 -0700 Subject: [PATCH] cloudstack - zBaremetal branch - add zone wizard - when hypervisor is BareMetal, click Next button in Guest Traffic step will finish the whole process. (for Frank's development) --- ui/scripts/ui-custom/zoneWizard.js | 13 ++++++++++++- ui/scripts/zoneWizard.js | 14 +++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/ui/scripts/ui-custom/zoneWizard.js b/ui/scripts/ui-custom/zoneWizard.js index 3a727149234..4f96a3c1969 100644 --- a/ui/scripts/ui-custom/zoneWizard.js +++ b/ui/scripts/ui-custom/zoneWizard.js @@ -1144,7 +1144,18 @@ if (($form && $form.find('.error:visible').size()) || !isCustomValidated) return false; } - + + //??? + var data = getData($wizard); + if(('zone' in data) && (data.zone.hypervisor == 'BareMetal')) { + if($('.zone-wizard:visible').find('#add_zone_guest_traffic_desc:visible').size() > 0) { //$steps.filter(':visible').index() == 6 + showStep('launch'); + completeAction(); + return false; + } + } + //??? + if (!$target.closest('.button.next.final').size()) showStep($steps.filter(':visible').index() + 2); else { diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js index 5f605b8363e..032c72ad011 100644 --- a/ui/scripts/zoneWizard.js +++ b/ui/scripts/zoneWizard.js @@ -2398,9 +2398,17 @@ dataType: "json", success: function(json) { args.data.returnedGuestNetwork.returnedVlanIpRange = json.createvlaniprangeresponse.vlan; - stepFns.addCluster({ - data: args.data - }); + + //??? + if(args.data.cluster.hypervisor == "BareMetal") { + alert('Frank, zone creation is done. Please refresh this page.'); + } + else { + stepFns.addCluster({ + data: args.data + }); + } + //??? }, error: function(XMLHttpResponse) { var errorMsg = parseXMLHttpResponse(XMLHttpResponse);