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
This commit is contained in:
Brian Federle 2013-07-10 16:47:40 -07:00
parent 9de2034832
commit 73cd064e51

View File

@ -367,8 +367,12 @@
}); });
} else if (data.protocol === 'protocolnumber') { } else if (data.protocol === 'protocolnumber') {
$.extend(data, { $.extend(data, {
protocolnumber: args.data.protocolnumber protocol: args.data.protocolnumber,
startport: args.data.startport,
endport: args.data.endport
}); });
delete args.data.protocolnumber;
} }
$.ajax({ $.ajax({
@ -1149,10 +1153,17 @@
success:function(json){ success:function(json){
var items = json.listnetworkaclsresponse.networkacl.sort(function(a, b) { var items = json.listnetworkaclsresponse.networkacl.sort(function(a, b) {
return a.number >= b.number; 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({ args.response.success({
data:items data: items
/* { /* {
cidrlist: '10.1.1.0/24', cidrlist: '10.1.1.0/24',
protocol: 'TCP', protocol: 'TCP',