From 19341d66f45710ceae513a4013e3a03512000f21 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 28 Aug 2013 16:34:56 -0700 Subject: [PATCH] CLOUDSTACK-4089: UI > zone wizard > hypervisor VMware > physical network > vmware_network_label: remove trailing comma if there is any. --- ui/scripts/zoneWizard.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js index 58119092db0..0ecddee3fdf 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) + } + } } }