cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muralire...@apache.org
Subject [35/50] [abbrv] git commit: refs/heads/gslb - Persistent Networks support - UI functionality
Date Thu, 07 Feb 2013 07:43:58 GMT
Persistent Networks support - UI functionality


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

Branch: refs/heads/gslb
Commit: bd825109d88447826ea6e42a9c3ac128fef0d0fd
Parents: 777147c
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Fri Feb 1 16:41:29 2013 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Fri Feb 1 16:41:29 2013 +0530

----------------------------------------------------------------------
 ui/scripts/configuration.js |   50 +++++++++++++++++++++++++++++++-------
 ui/scripts/network.js       |    6 ++++
 2 files changed, 47 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd825109/ui/scripts/configuration.js
----------------------------------------------------------------------
diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js
index 0fbea2d..c85a98a 100644
--- a/ui/scripts/configuration.js
+++ b/ui/scripts/configuration.js
@@ -1385,16 +1385,29 @@
 											args.$select.change(function() {											  
 												var $form = $(this).closest("form");
                         
-												if ($(this).val() == "Shared") {                          
-													$form.find('.form-item[rel=specifyVlan]').find('input[type=checkbox]').attr("disabled",
"disabled"); //make it read-only
-													$form.find('.form-item[rel=specifyVlan]').find('input[type=checkbox]').attr('checked',
true);	//make it checked
-												} else {  //$(this).val() == "Isolated" 
-													$form.find('.form-item[rel=specifyVlan]').find('input[type=checkbox]').removeAttr("disabled");
//make it editable													
+										if ($(this).val() == "Shared") {                          
+											 $form.find('.form-item[rel=specifyVlan]').find('input[type=checkbox]').attr("disabled",
"disabled"); //make it read-only
+											 $form.find('.form-item[rel=specifyVlan]').find('input[type=checkbox]').attr('checked',
true);	//make it checked
+											 $form.find('.form-item[rel=isPersistent]').find('input[type=checkbox]').attr("disabled","disabled");
+
+
+                                                                                } else {
 //$(this).val() == "Isolated" 
+											$form.find('.form-item[rel=specifyVlan]').find('input[type=checkbox]').removeAttr("disabled");
//make it editable													
+                                                                                        
$form.find('.form-item[rel=isPersistent]').find('input[type=checkbox]').removeAttr("disabled");
+
 												}												
 											});
                     }
                   },
 
+                 isPersistent:{
+                   label:'Persistent ',
+                   isBoolean:true,
+                   isChecked:false
+
+                 },
+
+
                   specifyVlan: { label: 'label.specify.vlan', isBoolean: true, docID: 'helpNetworkOfferingSpecifyVLAN'
},
 
                   useVpc: {
@@ -1757,18 +1770,31 @@
 
 								
 								if(inputData['guestIpType'] == "Shared"){ //specifyVlan checkbox is disabled, so
inputData won't include specifyVlan
-								  inputData['specifyVlan'] = true;  //hardcode inputData['specifyVlan'] 
+								  inputData['specifyVlan'] = true;  //hardcode inputData['specifyVlan']
 									inputData['specifyIpRanges'] = true;
+                                                                        inputData['isPersistent']
= false;
 								}
 								else if (inputData['guestIpType'] == "Isolated") { //specifyVlan checkbox is shown
 									if (inputData['specifyVlan'] == 'on') { //specifyVlan checkbox is checked
 										inputData['specifyVlan'] = true;	
-                    inputData['specifyIpRanges'] = true;										
+                                                                                inputData['specifyIpRanges']
= true;							
+
+                    
+
+			
 									}
 									else { //specifyVlan checkbox is unchecked
 										inputData['specifyVlan'] = false;
 										inputData['specifyIpRanges'] = false;
-									}					
+									}	
+                                                                        
+                                                                        if(inputData['isPersistent']
== 'on') {  //It is a persistent network
+                                                                               inputData['isPersistent']
= true;
+                                                                        }
+                                                                        else {    //Isolated
Network with Non-persistent network
+                                                                               inputData['isPersistent']
= false;
+                                                                                        
     }
+				
 								}			
 								
 																
@@ -1788,7 +1814,7 @@
                 });      
 												
 								if(args.$form.find('.form-item[rel=availability]').css("display") == "none")
-                  inputData['availability'] = 'Optional';		
+                  inputData['availability'] = 'Optional';
 								
                 if(args.$form.find('.form-item[rel=serviceOfferingId]').css("display") ==
"none")									
 									delete inputData.serviceOfferingId;
@@ -1992,6 +2018,12 @@
                     guestiptype: {
                       label: 'label.guest.type'
                     },
+
+                    ispersistent:{
+                      label:'Persistent ',
+                      converter:cloudStack.converters.toBooleanText
+                     },
+
                     availability: {
                       label: 'label.availability',
                       isEditable: true,

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd825109/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 408d220..84cc067 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -940,6 +940,12 @@
                     state: {
                       label: 'label.state'
                     },
+
+                    ispersistent:{
+                      label:'Persistent ',
+                      converter:cloudStack.converters.toBooleanText
+
+                     },
                     restartrequired: {
                       label: 'label.restart.required',
                       converter: function(booleanValue) {


Mime
View raw message