Skip to content

Commit ceb44ac

Browse files
author
Jessica Wang
committed
CLOUDSTACK-1251: cloudstack UI - zBaremetal - zone wizard - when hypervisor is BareMetal, click Next button in Guest Traffic step will finish the whole process.
1 parent 4b7dbbe commit ceb44ac

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

ui/scripts/ui-custom/zoneWizard.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,18 @@
12101210
if (($form && $form.find('.error:visible').size()) || !isCustomValidated)
12111211
return false;
12121212
}
1213-
1213+
1214+
//when hypervisor is BareMetal (begin)
1215+
var data = getData($wizard);
1216+
if(('zone' in data) && (data.zone.hypervisor == 'BareMetal')) {
1217+
if($('.zone-wizard:visible').find('#add_zone_guest_traffic_desc:visible').size() > 0) { //$steps.filter(':visible').index() == 6
1218+
showStep('launch');
1219+
completeAction();
1220+
return false;
1221+
}
1222+
}
1223+
//when hypervisor is BareMetal (end)
1224+
12141225
if (!$target.closest('.button.next.final').size())
12151226
showStep($steps.filter(':visible').index() + 2);
12161227
else {

ui/scripts/zoneWizard.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2735,9 +2735,17 @@
27352735
dataType: "json",
27362736
success: function(json) {
27372737
args.data.returnedGuestNetwork.returnedVlanIpRange = json.createvlaniprangeresponse.vlan;
2738-
stepFns.addCluster({
2739-
data: args.data
2740-
});
2738+
2739+
//when hypervisor is BareMetal (begin)
2740+
if(args.data.cluster.hypervisor == "BareMetal") {
2741+
alert('Zone creation is completed. Please refresh this page.');
2742+
}
2743+
else {
2744+
stepFns.addCluster({
2745+
data: args.data
2746+
});
2747+
}
2748+
//when hypervisor is BareMetal (end)
27412749
},
27422750
error: function(XMLHttpResponse) {
27432751
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);

0 commit comments

Comments
 (0)