mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-15 18:12:35 +01:00
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:
parent
9de2034832
commit
73cd064e51
@ -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',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user