Updated Branches:
  refs/heads/4.2 72fcfaaaa -> 6fcb2dfde

CLOUDSTACK-4266: UI > Infrastructure > clusters > create cluster dialog > 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/6fcb2dfd
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6fcb2dfd
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6fcb2dfd

Branch: refs/heads/4.2
Commit: 6fcb2dfde7931f3e22909873e3afed594ffb2985
Parents: 72fcfaa
Author: Jessica Wang <[email protected]>
Authored: Tue Aug 13 13:23:36 2013 -0700
Committer: Jessica Wang <[email protected]>
Committed: Tue Aug 13 13:23:36 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6fcb2dfd/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index c51bd48..4ec5735 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -10683,21 +10683,21 @@
                                     vsmipaddress: {
                                         label: 'Nexus 1000v IP Address',
                                         validation: {
-                                            required: true
+                                            required: false
                                         },
                                         isHidden: false
                                     },
                                     vsmusername: {
                                         label: 'Nexus 1000v Username',
                                         validation: {
-                                            required: true
+                                            required: false
                                         },
                                         isHidden: false
                                     },
                                     vsmpassword: {
                                         label: 'Nexus 1000v Password',
                                         validation: {
-                                            required: true
+                                            required: false
                                         },
                                         isPassword: true,
                                         isHidden: false
@@ -10741,11 +10741,17 @@
                                     if (args.data.vSwitchGuestName != "")
                                         array1.push("&guestvswitchname=" + 
args.data.vSwitchGuestName);
 
-                                    if (args.data.vsmipaddress) {
-                                        array1.push('&vsmipaddress=' + 
args.data.vsmipaddress);
-                                        array1.push('&vsmusername=' + 
args.data.vsmusername);
-                                        array1.push('&vsmpassword=' + 
args.data.vsmpassword);
+                                    if (args.data.vsmipaddress != null && 
args.data.vsmipaddress.length > 0) {
+                                        array1.push('&vsmipaddress=' + 
args.data.vsmipaddress);                                        
+                                    }
+                                    
+                                    if(args.data.vsmusername != null && 
args.data.vsmusername.length > 0) {
+                                       array1.push('&vsmusername=' + 
args.data.vsmusername);
                                     }
+                                    
+                                    if(args.data.vsmpassword != null && 
args.data.vsmpassword.length > 0) {
+                                       array1.push('&vsmpassword=' + 
args.data.vsmpassword);
+                                    }                                          
                              
 
                                     var hostname = args.data.vCenterHost;
                                     var dcName = args.data.vCenterDatacenter;

Reply via email to