Skip to content

Commit 59e1e9b

Browse files
author
Jessica Wang
committed
CLOUDSTACK-5359: UI > Infrastructure > Clusters > Add Cluster > Public Traffic vSwitch Type field, Guest Traffic vSwitch Type field > do not pass the value of the form field to API call when the the form field is not displaying.
1 parent d3af2de commit 59e1e9b

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

‎ui/scripts/system.js‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14179,19 +14179,20 @@
1417914179
array1.push("&password=" + todb(args.data.vCenterPassword));
1418014180

1418114181
//vSwitch Public Type
14182-
if (args.data.vSwitchPublicType != "")
14183-
array1.push("&publicvswitchtype=" + args.data.vSwitchPublicType);
14184-
14185-
if (args.data.vSwitchPublicName != "")
14186-
array1.push("&publicvswitchname=" + args.data.vSwitchPublicName);
14187-
14182+
if (args.$form.find('.form-item[rel=vSwitchPublicType]').css('display') != 'none' && args.data.vSwitchPublicType != "") {
14183+
array1.push("&publicvswitchtype=" + args.data.vSwitchPublicType);
14184+
}
14185+
if (args.$form.find('.form-item[rel=vSwitchPublicName]').css('display') != 'none' && args.data.vSwitchPublicName != "") {
14186+
array1.push("&publicvswitchname=" + args.data.vSwitchPublicName);
14187+
}
1418814188

1418914189
//vSwitch Guest Type
14190-
if (args.data.vSwitchGuestType != "")
14191-
array1.push("&guestvswitchtype=" + args.data.vSwitchGuestType);
14192-
14193-
if (args.data.vSwitchGuestName != "")
14194-
array1.push("&guestvswitchname=" + args.data.vSwitchGuestName);
14190+
if (args.$form.find('.form-item[rel=vSwitchGuestType]').css('display') != 'none' && args.data.vSwitchGuestType != "") {
14191+
array1.push("&guestvswitchtype=" + args.data.vSwitchGuestType);
14192+
}
14193+
if (args.$form.find('.form-item[rel=vSwitchGuestName]').css('display') != 'none' && args.data.vSwitchGuestName != "") {
14194+
array1.push("&guestvswitchname=" + args.data.vSwitchGuestName);
14195+
}
1419514196

1419614197
//Nexus VSM fields
1419714198
if (args.$form.find('.form-item[rel=vsmipaddress]').css('display') != 'none' && args.data.vsmipaddress != null && args.data.vsmipaddress.length > 0) {

0 commit comments

Comments
 (0)