You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2012/10/23 11:49:18 UTC

[9/50] [abbrv] git commit: CS-16555: cloudstack UI - create network offering - when LB service is checked and provider is F5, show new dropdown "Inline Mode" dropdown. Hide it otherwise.

CS-16555: cloudstack UI - create network offering - when LB service is checked and provider is F5, show new dropdown "Inline Mode" dropdown. Hide it otherwise.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/5c71d96f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/5c71d96f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/5c71d96f

Branch: refs/heads/marvin-parallel
Commit: 5c71d96f559bf2739f29c3d70daf6f5c6cb7dba1
Parents: f311880
Author: Jessica Wang <je...@citrix.com>
Authored: Mon Oct 22 11:05:30 2012 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Mon Oct 22 11:49:16 2012 -0700

----------------------------------------------------------------------
 ui/scripts/configuration.js |   28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5c71d96f/ui/scripts/configuration.js
----------------------------------------------------------------------
diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js
index f2f736d..450a343 100644
--- a/ui/scripts/configuration.js
+++ b/ui/scripts/configuration.js
@@ -1198,7 +1198,16 @@
 											}											
 										}
 										//hide/show service fields upon guestIpType(Shared/Isolated), zoneType(Advanced/Basic), having VpcVirtualRouter or not ***** (end) *****			
-																				
+												
+
+                    //show LB InlineMode dropdown only when (1)LB Service is checked (2)Service Provider is F5 							
+										if((args.$form.find('.form-item[rel=\"service.Lb.isEnabled\"]').find('input[type=checkbox]').is(':checked') == true)
+										   &&(args.$form.find('.form-item[rel=\"service.Lb.provider\"]').find('select').val() == 'F5BigIp')) {										  
+											args.$form.find('.form-item[rel=\"service.Lb.inlineModeDropdown\"]').css('display', 'inline-block');	
+										}
+										else {										  
+											args.$form.find('.form-item[rel=\"service.Lb.inlineModeDropdown\"]').hide();	
+										}												
 										
 										//show LB Isolation dropdown only when (1)LB Service is checked (2)Service Provider is Netscaler OR F5 (3)Guest IP Type is Isolated 									
 										if((args.$form.find('.form-item[rel=\"service.Lb.isEnabled\"]').find('input[type=checkbox]').is(':checked') == true)
@@ -1501,7 +1510,16 @@
                         ]
                       })
                     }
-                  },									
+                  },	                
+									"service.Lb.inlineModeDropdown": {
+										label: 'Mode',
+										select: function(args) {
+											var items = [];
+											items.push({id: "false", description: "side by side"});
+											items.push({id: "true", description: "inline"});
+											args.response.success({data: items});
+										}
+									},  									
 									"service.StaticNat.elasticIpCheckbox" : {
 										label: "label.elastic.IP",
 										isHidden: true,										
@@ -1564,6 +1582,12 @@
 											inputData['servicecapabilitylist[' + serviceCapabilityIndex + '].capabilitytype'] = 'ElasticLb'; 
 											inputData['servicecapabilitylist[' + serviceCapabilityIndex + '].capabilityvalue'] = true; //because this checkbox's value == "on"
 											serviceCapabilityIndex++;
+										} 
+                    else if ((key == 'service.Lb.inlineModeDropdown') && ("Lb" in serviceProviderMap) && (serviceProviderMap.Lb	== "F5BigIp")) {                      							
+											inputData['servicecapabilitylist[' + serviceCapabilityIndex + '].service'] = 'lb';
+											inputData['servicecapabilitylist[' + serviceCapabilityIndex + '].capabilitytype'] = 'InlineMode';
+											inputData['servicecapabilitylist[' + serviceCapabilityIndex + '].capabilityvalue'] = value;
+											serviceCapabilityIndex++;
 										} 										
 										else if ((key == 'service.Lb.lbIsolationDropdown') && ("Lb" in serviceProviderMap)) {											
 											inputData['servicecapabilitylist[' + serviceCapabilityIndex + '].service'] = 'lb';