CLOUDSTACK-4089: UI > zone wizard > hypervisor VMware > physical network > vmware_network_label: remove trailing comma if there is any.

This commit is contained in:
Jessica Wang 2013-08-28 16:34:56 -07:00
parent e217c0f1c3
commit 19341d66f4

View File

@ -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)
}
}
}
}