mirror of https://github.com/apache/cloudstack.git
cloudStack - capability doesn't always get returned in Firewall object. Do a extra validation before loop through it.
This commit is contained in:
parent
9961e1ca2a
commit
80e0e7a4e6
|
|
@ -1221,23 +1221,27 @@ function ipJsonToDetailsTab() {
|
|||
|
||||
function ipFindNetworkServiceByName(pName, networkObj) {
|
||||
if(networkObj == null)
|
||||
return null;
|
||||
for(var i=0; i<networkObj.service.length; i++) {
|
||||
var networkServiceObj = networkObj.service[i];
|
||||
if(networkServiceObj.name == pName)
|
||||
return networkServiceObj;
|
||||
}
|
||||
return null;
|
||||
if(networkObj.service != null) {
|
||||
for(var i=0; i<networkObj.service.length; i++) {
|
||||
var networkServiceObj = networkObj.service[i];
|
||||
if(networkServiceObj.name == pName)
|
||||
return networkServiceObj;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function ipFindCapabilityByName(pName, networkServiceObj) {
|
||||
if(networkServiceObj == null)
|
||||
return null;
|
||||
for(var i=0; i<networkServiceObj.capability.length; i++) {
|
||||
var capabilityObj = networkServiceObj.capability[i];
|
||||
if(capabilityObj.name == pName)
|
||||
return capabilityObj;
|
||||
}
|
||||
return null;
|
||||
if(networkServiceObj.capability != null) {
|
||||
for(var i=0; i<networkServiceObj.capability.length; i++) {
|
||||
var capabilityObj = networkServiceObj.capability[i];
|
||||
if(capabilityObj.name == pName)
|
||||
return capabilityObj;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue