Skip to content

Commit 9d7f48c

Browse files
author
Jessica Wang
committed
CLOUDSTACK-485: cloudstack UI - zone wizard - Hide Guest Traffic Step(VLAN Range field) when Advanced/SecurityGroup is selected. Show it when Advanced/VLAN is selected.
1 parent 60cec46 commit 9d7f48c

1 file changed

Lines changed: 27 additions & 22 deletions

File tree

‎ui/scripts/zoneWizard.js‎

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -249,31 +249,36 @@
249249
$('.setup-guest-traffic').removeClass('advanced');
250250
skipGuestTrafficStep = false; //set value
251251
}
252-
else {
252+
else { //args.data['network-model'] == 'Advanced'
253253
$('.setup-guest-traffic').removeClass('basic');
254254
$('.setup-guest-traffic').addClass('advanced');
255-
256-
//skip the step if OVS tunnel manager is enabled
257-
skipGuestTrafficStep = false; //reset it before ajax call
258-
$.ajax({
259-
url: createURL('listConfigurations'),
260-
data: {
261-
name: 'sdn.ovs.controller'
262-
},
263-
dataType: "json",
264-
async: false,
265-
success: function(json) {
266-
var items = json.listconfigurationsresponse.configuration; //2 entries returned: 'sdn.ovs.controller', 'sdn.ovs.controller.default.label'
267-
$(items).each(function(){
268-
if(this.name == 'sdn.ovs.controller') {
269-
if(this.value == 'true' || this.value == true) {
270-
skipGuestTrafficStep = true;
255+
256+
if(args.data["zone-isolation-mode"] == "VLAN") {
257+
//skip the step if OVS tunnel manager is enabled
258+
skipGuestTrafficStep = false; //reset it before ajax call
259+
$.ajax({
260+
url: createURL('listConfigurations'),
261+
data: {
262+
name: 'sdn.ovs.controller'
263+
},
264+
dataType: "json",
265+
async: false,
266+
success: function(json) {
267+
var items = json.listconfigurationsresponse.configuration; //2 entries returned: 'sdn.ovs.controller', 'sdn.ovs.controller.default.label'
268+
$(items).each(function(){
269+
if(this.name == 'sdn.ovs.controller') {
270+
if(this.value == 'true' || this.value == true) {
271+
skipGuestTrafficStep = true;
272+
}
273+
return false; //break each loop
271274
}
272-
return false; //break each loop
273-
}
274-
});
275-
}
276-
});
275+
});
276+
}
277+
});
278+
}
279+
else { //args.data["zone-isolation-mode"] == "SG"
280+
skipGuestTrafficStep = true;
281+
}
277282
}
278283
return !skipGuestTrafficStep;
279284
},

0 commit comments

Comments
 (0)