Updated Branches: refs/heads/4.2-forward b24e9a6dd -> cb12cf935
CLOUDSTACK-4089: UI > zone wizard > hypervisor VMware > physical network > vmware_network_label: remove trailing comma if there is any. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cb12cf93 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cb12cf93 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cb12cf93 Branch: refs/heads/4.2-forward Commit: cb12cf93544308cdac3ffd6062cc75e10cf16ab4 Parents: b24e9a6 Author: Jessica Wang <jessicaw...@apache.org> Authored: Wed Aug 28 16:34:56 2013 -0700 Committer: Jessica Wang <jessicaw...@apache.org> Committed: Wed Aug 28 16:37:46 2013 -0700 ---------------------------------------------------------------------- ui/scripts/zoneWizard.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cb12cf93/ui/scripts/zoneWizard.js ---------------------------------------------------------------------- diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js index 5811909..0ecddee 100755 --- a/ui/scripts/zoneWizard.js +++ b/ui/scripts/zoneWizard.js @@ -57,8 +57,13 @@ trafficLabel += trafficConfig.vSwitchType; } - if (trafficLabel.length == 0) //trafficLabel == '' + if (trafficLabel.length == 0) { //trafficLabel == '' trafficLabel = null; + } else if (trafficLabel.length >= 1) { + if (trafficLabel.charAt(trafficLabel.length-1) == ',') { //if last character is comma + trafficLabel = trafficLabel.substring(0, trafficLabel.length - 1); //remove the last character (which is comma) + } + } } }