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/19341d66
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/19341d66
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/19341d66

Branch: refs/heads/ldapplugin
Commit: 19341d66f45710ceae513a4013e3a03512000f21
Parents: e217c0f
Author: Jessica Wang <[email protected]>
Authored: Wed Aug 28 16:34:56 2013 -0700
Committer: Jessica Wang <[email protected]>
Committed: Wed Aug 28 16:38:43 2013 -0700

----------------------------------------------------------------------
 ui/scripts/zoneWizard.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/19341d66/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)  
+                       }
+                       }                       
                }
         }
         

Reply via email to