You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by se...@apache.org on 2013/07/12 09:51:07 UTC

[12/50] git commit: updated refs/heads/sdnextensions to bcfb4e6

CLOUDSTACK-2779: Fix ACL rule protocol number field

-Fix protocol number field not passing start/end port

-Fix protocol number for ACL rule 'edit' form


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

Branch: refs/heads/sdnextensions
Commit: 73cd064e517bf3a3e3d1d8b34e4f1aaf6599adcc
Parents: 9de2034
Author: Brian Federle <br...@citrix.com>
Authored: Wed Jul 10 16:47:40 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Wed Jul 10 16:47:47 2013 -0700

----------------------------------------------------------------------
 ui/scripts/vpc.js | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/73cd064e/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 17ea65e..ab4d730 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -367,8 +367,12 @@
             });
           } else if (data.protocol === 'protocolnumber') {
             $.extend(data, {
-              protocolnumber: args.data.protocolnumber
+              protocol: args.data.protocolnumber,
+              startport: args.data.startport,
+              endport: args.data.endport
             });
+
+            delete args.data.protocolnumber;
           }
 
           $.ajax({
@@ -1149,10 +1153,17 @@
                         success:function(json){
                           var items = json.listnetworkaclsresponse.networkacl.sort(function(a, b) {
                             return a.number >= b.number;
+                          }).map(function(acl) {
+                            if (parseInt(acl.protocol)) { // protocol number
+                              acl.protocolnumber = acl.protocol;
+                              acl.protocol = "protocolnumber";
+                            }
+                            
+                            return acl;
                           });
 
                           args.response.success({
-                            data:items
+                            data: items
                             /* {
                                cidrlist: '10.1.1.0/24',
                                protocol: 'TCP',