You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/07/11 01:48:05 UTC

[2/2] git commit: updated refs/heads/4.2 to 6333353

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/63333532
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/63333532
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/63333532

Branch: refs/heads/4.2
Commit: 633335321d491526346327b96a3059f72d191a45
Parents: 2ea61e7
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:58 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/63333532/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 7c8cfa3..d46b265 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -361,8 +361,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({
@@ -1143,10 +1147,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',