cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [39/50] [abbrv] git commit: updated refs/heads/ui-vpc-redesign to d00077a
Date Fri, 10 May 2013 20:33:40 GMT
CLOUDSTACK-760:Allow ACL on all layer 4 protocols


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

Branch: refs/heads/ui-vpc-redesign
Commit: edd2fbb266d316fc130520876dfb2f7152223d37
Parents: dfad178
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Fri May 10 16:47:09 2013 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Fri May 10 16:47:09 2013 +0530

----------------------------------------------------------------------
 ui/scripts/vpc.js |   33 +++++++++++++++++++++++++++++++--
 1 files changed, 31 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/edd2fbb2/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index db964e6..dc26265 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -48,6 +48,22 @@
               return name != 'icmptype' && name != 'icmpcode' && name !=
'cidrlist';
             });
 
+            var $protocolinput = args.$form.find('th,td');
+            var $protocolFields = $protocolinput.filter(function(){
+             var name = $(this).attr('rel');
+
+             return  $.inArray(name,['protocolnumber']) > -1;
+            });
+
+           if($(this).val() == 'protocolnumber' ){
+
+             $protocolFields.show();
+            }
+            else{
+             $protocolFields.hide();
+            }
+
+
             if ($(this).val() == 'icmp') {
               $icmpFields.show();
               $icmpFields.attr('disabled', false);
@@ -68,11 +84,16 @@
             data: [
               { name: 'tcp', description: 'TCP' },
               { name: 'udp', description: 'UDP' },
-              { name: 'icmp', description: 'ICMP' }
+              { name: 'icmp', description: 'ICMP' },
+              { name: 'all', description: 'ALL'},
+              { name: 'protocolnumber', description: 'Protocol Number'}
+
             ]
           });
         }
       },
+
+      'protocolnumber': {label:'Protocol Number',isDisabled:true,isHidden:true,edit:true},
       'startport': { edit: true, label: 'label.start.port' },
       'endport': { edit: true, label: 'label.end.port' },
       'networkid': {
@@ -136,7 +157,15 @@
       label: 'label.add',
       action: function(args) {
         var $multi = args.$multi;
-        
+        //Support for Protocol Number between 0 to 255
+        if(args.data.protocol == 'protocolnumber'){
+            $.extend(args.data,{protocol:args.data.protocolnumber});
+            delete args.data.protocolnumber;
+        }
+        else
+          delete args.data.protocolnumber;
+
+       
         $.ajax({
           url: createURL('createNetworkACL'),
           data: $.extend(args.data, {


Mime
View raw message