Updated Branches: refs/heads/4.2 e2f47871d -> 72fcfaaaa
CLOUDSTACK-4266: UI > zone wizard > cluster step > make Nexus 1000v fields optional. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/72fcfaaa Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/72fcfaaa Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/72fcfaaa Branch: refs/heads/4.2 Commit: 72fcfaaaa00805068b70d270d5709ecba33285e2 Parents: e2f4787 Author: Jessica Wang <[email protected]> Authored: Tue Aug 13 13:15:24 2013 -0700 Committer: Jessica Wang <[email protected]> Committed: Tue Aug 13 13:17:11 2013 -0700 ---------------------------------------------------------------------- ui/scripts/zoneWizard.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/72fcfaaa/ui/scripts/zoneWizard.js ---------------------------------------------------------------------- diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js index 12bf983..68d2a56 100755 --- a/ui/scripts/zoneWizard.js +++ b/ui/scripts/zoneWizard.js @@ -1168,21 +1168,21 @@ vsmipaddress: { label: 'Nexus 1000v IP Address', validation: { - required: true + required: false }, isHidden: true }, vsmusername: { label: 'Nexus 1000v Username', validation: { - required: true + required: false }, isHidden: true }, vsmpassword: { label: 'Nexus 1000v Password', validation: { - required: true + required: false }, isPassword: true, isHidden: true @@ -3789,11 +3789,17 @@ array1.push("&guestvswitchname=" + args.data.cluster.vSwitchGuestName); */ - if (args.data.cluster.vsmipaddress) { // vSwitch is enabled + if (args.data.cluster.vsmipaddress != null && args.data.cluster.vsmipaddress.length > 0) { array1.push('&vsmipaddress=' + args.data.cluster.vsmipaddress); - array1.push('&vsmusername=' + args.data.cluster.vsmusername); - array1.push('&vsmpassword=' + args.data.cluster.vsmpassword); } + + if(args.data.cluster.vsmusername != null && args.data.cluster.vsmusername.length > 0) { + array1.push('&vsmusername=' + args.data.cluster.vsmusername); + } + + if(args.data.cluster.vsmpassword != null && args.data.cluster.vsmpassword.length > 0) { + array1.push('&vsmpassword=' + args.data.cluster.vsmpassword); + } var hostname = args.data.cluster.vCenterHost; var dcName = args.data.cluster.vCenterDatacenter;
