Repository: cloudstack Updated Branches: refs/heads/master d3af2de73 -> 59e1e9bbd
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. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/59e1e9bb Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/59e1e9bb Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/59e1e9bb Branch: refs/heads/master Commit: 59e1e9bbd5f7bc45d77002dd5abdd91843dd210f Parents: d3af2de Author: Jessica Wang <[email protected]> Authored: Wed Oct 8 16:01:57 2014 -0700 Committer: Jessica Wang <[email protected]> Committed: Wed Oct 8 16:01:57 2014 -0700 ---------------------------------------------------------------------- ui/scripts/system.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/59e1e9bb/ui/scripts/system.js ---------------------------------------------------------------------- diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 3f6efce..1a14e31 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -14179,19 +14179,20 @@ array1.push("&password=" + todb(args.data.vCenterPassword)); //vSwitch Public Type - if (args.data.vSwitchPublicType != "") - array1.push("&publicvswitchtype=" + args.data.vSwitchPublicType); - - if (args.data.vSwitchPublicName != "") - array1.push("&publicvswitchname=" + args.data.vSwitchPublicName); - + if (args.$form.find('.form-item[rel=vSwitchPublicType]').css('display') != 'none' && args.data.vSwitchPublicType != "") { + array1.push("&publicvswitchtype=" + args.data.vSwitchPublicType); + } + if (args.$form.find('.form-item[rel=vSwitchPublicName]').css('display') != 'none' && args.data.vSwitchPublicName != "") { + array1.push("&publicvswitchname=" + args.data.vSwitchPublicName); + } //vSwitch Guest Type - if (args.data.vSwitchGuestType != "") - array1.push("&guestvswitchtype=" + args.data.vSwitchGuestType); - - if (args.data.vSwitchGuestName != "") - array1.push("&guestvswitchname=" + args.data.vSwitchGuestName); + if (args.$form.find('.form-item[rel=vSwitchGuestType]').css('display') != 'none' && args.data.vSwitchGuestType != "") { + array1.push("&guestvswitchtype=" + args.data.vSwitchGuestType); + } + if (args.$form.find('.form-item[rel=vSwitchGuestName]').css('display') != 'none' && args.data.vSwitchGuestName != "") { + array1.push("&guestvswitchname=" + args.data.vSwitchGuestName); + } //Nexus VSM fields if (args.$form.find('.form-item[rel=vsmipaddress]').css('display') != 'none' && args.data.vsmipaddress != null && args.data.vsmipaddress.length > 0) {
