cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: cloudstack 3.0 UI - site to site VPN - listView - (1)split IKE policy field into 3 fields. (2)split ESP plicy field into 3 fields. (3)split lifetime field into 2 fields. (4) add Dead Peer Detection field.
Date Mon, 06 Aug 2012 20:25:59 GMT
Updated Branches:
  refs/heads/vpc 8b16e32b5 -> 532806ba1


cloudstack 3.0 UI - site to site VPN - listView - (1)split IKE policy field into 3 fields.
(2)split ESP plicy field into 3 fields. (3)split lifetime field into 2 fields. (4) add Dead
Peer Detection field.


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

Branch: refs/heads/vpc
Commit: 532806ba13451bd4c7b9803ed67828b9eed2b418
Parents: 8b16e32
Author: Jessica Wang <jessica.wang@citrix.com>
Authored: Mon Aug 6 11:57:42 2012 -0700
Committer: Jessica Wang <jessica.wang@citrix.com>
Committed: Mon Aug 6 13:25:21 2012 -0700

----------------------------------------------------------------------
 ui/scripts/network.js |  163 +++++++++++++++++++++++++++++++++-----------
 1 files changed, 123 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/532806ba/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 7d41737..978625a 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -3970,8 +3970,8 @@
                       args.response.success({data: items});
                     }
                   },									
-									ikepolicy: {
-                    label: 'IKE policy',
+									ikeDh: {
+                    label: 'IKE DH',
                     select: function(args) {
                       var items = [];
                       items.push({id: '', description: ''});
@@ -4043,8 +4043,8 @@
 								};
 																
 								var ikepolicy = args.data.ikeEncryption + '-' + args.data.ikeHash;
-								if(args.data.ikepolicy != null && args.data.ikepolicy.length > 0)
-								  ikepolicy += ';' + args.data.ikepolicy;
+								if(args.data.ikeDh != null && args.data.ikeDh.length > 0)
+								  ikepolicy += ';' + args.data.ikeDh;
 								
 								$.extend(data, {
 								  ikepolicy: ikepolicy
@@ -4184,56 +4184,139 @@
 										  label: 'IPsec Preshared-Key',
                       isEditable: true,
 					            validation: { required: true } 
-										},                    
-                    ikepolicy: { 
-										  label: 'IKE policy',
-                      isEditable: true,											
+										},   					
+										
+										//IKE Policy									
+										ikeEncryption: {
+											label: 'IKE Encryption',
+											isEditable: true,
 											select: function(args) {
 												var items = [];
-												items.push({id: '3des-md5', description: '3des-md5'});
-												items.push({id: 'aes-md5', description: 'aes-md5'});
-												items.push({id: 'aes128-md5', description: 'aes128-md5'});												
-												items.push({id: '3des-sha1', description: '3des-sha1'});
-												items.push({id: 'aes-sha1', description: 'aes-sha1'});
-												items.push({id: 'aes128-sha1', description: 'aes128-sha1'});												
+												items.push({id: '3des', description: '3des'});
+												items.push({id: 'aes128', description: 'aes128'});
+												items.push({id: 'aes192', description: 'aes192'});
+												items.push({id: 'aes256', description: 'aes256'});             
 												args.response.success({data: items});
 											}
-										},
-                    esppolicy:{ 
-										  label: 'ESP policy',
-                      isEditable: true,											
+										},									
+										ikeHash: {
+											label: 'IKE Hash',
+											isEditable: true,
+											select: function(args) {
+												var items = [];
+												items.push({id: 'md5', description: 'md5'});
+												items.push({id: 'sha1', description: 'sha1'});               
+												args.response.success({data: items});
+											}
+										},									
+										ikeDh: {
+											label: 'IKE DH',
+											isEditable: true,
+											select: function(args) {
+												var items = [];
+												items.push({id: '', description: ''});
+												items.push({id: 'modp1024', description: 'modp1024'});
+												items.push({id: 'modp1536', description: 'modp1536'});										 
+												args.response.success({data: items});
+											}
+										},						
+										
+										//ESP Policy
+										espEncryption: {
+											label: 'ESP Encryption',
+											isEditable: true,
+											select: function(args) {
+												var items = [];
+												items.push({id: '3des', description: '3des'});
+												items.push({id: 'aes128', description: 'aes128'});
+												items.push({id: 'aes192', description: 'aes192'});
+												items.push({id: 'aes256', description: 'aes256'});             
+												args.response.success({data: items});
+											}
+										},									
+										espHash: {
+											label: 'ESP Hash',
+											isEditable: true,
+											select: function(args) {
+												var items = [];
+												items.push({id: 'md5', description: 'md5'});
+												items.push({id: 'sha1', description: 'sha1'});               
+												args.response.success({data: items});
+											}
+										},									
+										perfectForwardSecrecy: {
+											label: 'Perfect Forward Secrecy',
+											isEditable: true,
 											select: function(args) {
 												var items = [];
-												items.push({id: '3des-md5', description: '3des-md5'});
-												items.push({id: 'aes-md5', description: 'aes-md5'});
-												items.push({id: 'aes128-md5', description: 'aes128-md5'});
-												items.push({id: '3des-sha1', description: '3des-sha1'});
-												items.push({id: 'aes-sha1', description: 'aes-sha1'});
-												items.push({id: 'aes128-sha1', description: 'aes128-sha1'});
+												items.push({id: '', description: ''});
+												items.push({id: 'modp1024', description: 'modp1024'});
+												items.push({id: 'modp1536', description: 'modp1536'});										 
 												args.response.success({data: items});
-											}											
+											}
+										},	           
+									 
+									 	ikelifetime: {
+											label: 'IKE lifetime (second)',
+											defaultValue: '86400',
+											validation: { required: false, number: true }
 										},
-                    lifetime :{
-										  label: 'Lifetime (second)',
-                      isEditable: true
+										esplifetime: {
+											label: 'ESP Lifetime (second)',
+											defaultValue: '3600',
+											validation: { required: false, number: true }
 										},
+										
+										dpd: {
+											label: 'Dead Peer Detection',											
+                      isBoolean: true,
+                      isEditable: true,
+                      converter:cloudStack.converters.toBooleanText
+										},  									 
+									 
 										id: { label: 'label.id' },
                     domain: { label: 'label.domain' },
                     account: { label: 'label.account' }
                   }
                 ],
-                dataProvider: function(args) {		
-									$.ajax({
-										url: createURL("listVpnCustomerGateways"),
-										data: {
-										  id: args.context.vpnCustomerGateway[0].id
-										},										
-										success: function(json) {
-											var item = json.listvpncustomergatewaysresponse.vpncustomergateway[0];
-											args.response.success({data: item});
-										}
-									});									
-								}
+
+                dataProvider: function(args) {
+                  $.ajax({
+                    url: createURL("listVpnCustomerGateways"),
+                    data: {
+                      id: args.context.vpnCustomerGateway[0].id
+                    },
+                    success: function(json) {
+                      var item = json.listvpncustomergatewaysresponse.vpncustomergateway[0];
+											
+                      //IKE POlicy											
+											var a1 = item.ikepolicy.split('-');  //e.g. item.ikepolicy == '3des-md5' or '3des-md5;modp1024'
+											item.ikeEncryption = a1[0];
+											if(a1[1].indexOf(';') == -1) {
+											  item.ikeHash = a1[1];
+											}
+											else {
+											  var a2 = a1[1].split(';');
+												item.ikeHash = a2[0];
+												item.ikeDh = a2[1];
+											}
+											
+											//ESP Policy											
+											var a1 = item.esppolicy.split('-');  //e.g. item.esppolicy == '3des-md5' or '3des-md5;modp1024'
+											item.espEncryption = a1[0];
+											if(a1[1].indexOf(';') == -1) {
+											  item.espHash = a1[1];
+											}
+											else {
+											  var a2 = a1[1].split(';');
+												item.espHash = a2[0];
+												item.perfectForwardSecrecy = a2[1];
+											}
+											
+                      args.response.success({data: item});
+                    }
+                  });
+                }
               }
             }
           }


Mime
View raw message