mirror of https://github.com/apache/cloudstack.git
bug 12614: cloudStack 3.0 new UI - system - Add Zone Wizard - basic zone - when securityGroupsEnabled checkbox is unchecked, exclude network offerings that has securityGroup service.
This commit is contained in:
parent
134b38bb2d
commit
3de22e41aa
|
|
@ -2851,23 +2851,37 @@
|
|||
}
|
||||
});
|
||||
|
||||
var networkOfferingObjsWithoutSG = [];
|
||||
$.ajax({
|
||||
url: createURL("listNetworkOfferings&state=Enabled&guestiptype=Shared"),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
networkOfferingObjs = json.listnetworkofferingsresponse.networkoffering;
|
||||
|
||||
$(networkOfferingObjs).each(function() {
|
||||
var includingSGP = false;
|
||||
var serviceObjArray = this.service;
|
||||
for(var k = 0; k < serviceObjArray.length; k++) {
|
||||
if(serviceObjArray[k].name == "SecurityGroup") {
|
||||
includingSGP = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(includingSGP == false) //withoutSG
|
||||
networkOfferingObjsWithoutSG.push(this);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
args.response.success({
|
||||
domains: domainObjs,
|
||||
|
||||
// Non-security-group-enabled offerings
|
||||
networkOfferings: networkOfferingObjs,
|
||||
networkOfferings: networkOfferingObjsWithoutSG,
|
||||
|
||||
// Security group-enabled offerings
|
||||
securityGroupNetworkOfferings: []
|
||||
securityGroupNetworkOfferings: networkOfferingObjs
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue