From 73cd064e517bf3a3e3d1d8b34e4f1aaf6599adcc Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Wed, 10 Jul 2013 16:47:40 -0700 Subject: [PATCH] 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 --- ui/scripts/vpc.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index 17ea65e6847..ab4d7304710 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',