cloudStack 3.0 new UI - instance wizard - fix a bug that isolated network didn't show in step 5.

This commit is contained in:
Jessica Wang 2011-12-02 15:32:02 -08:00
parent a4773b7080
commit 7b68824efb
1 changed files with 10 additions and 4 deletions

View File

@ -257,7 +257,6 @@
var networks = json.listnetworksresponse.network;
//***** check if there is an isolated network with sourceNAT (begin) *****
//isolatedSourcenatNetwork is first radio button in default network section. Show isolatedSourcenatNetwork when its networkofferingavailability is 'Required' or'Optional'
var isolatedSourcenatNetwork = null;
if(selectedZoneObj.securitygroupsenabled == false) {
if (networks != null && networks.length > 0) {
@ -304,11 +303,16 @@
}
}
//***** check if there is an isolated network with sourceNAT (end) *****
//***** populate all networks (begin) **********************************
//isolatedSourcenatNetwork is first radio button in default network section. Show isolatedSourcenatNetwork when its networkofferingavailability is 'Required' or'Optional'
if (isolatedSourcenatNetwork.networkofferingavailability == 'Required' || isolatedSourcenatNetwork.networkofferingavailability == 'Optional') {
defaultNetworkArray.push(isolatedSourcenatNetwork);
}
//default networks are in default network section
//non-default networks are in additional network section
//non-default networks are in additional network section
if (networks != null && networks.length > 0) {
for (var i = 0; i < networks.length; i++) {
//if selectedZoneObj.securitygroupsenabled is true and users still choose to select network instead of security group (from dialog), then UI won't show networks whose securitygroupenabled is true.
@ -320,7 +324,9 @@
if (isolatedSourcenatNetwork.networkofferingavailability == 'Required') {
continue; //don't display 2nd~Nth radio buttons in default network section when isolatedSourcenatNetwork.networkofferingavailability == 'Required'
}
defaultNetworkArray.push(networks[i]);
if(networks[i].id != isolatedSourcenatNetwork.id) {
defaultNetworkArray.push(networks[i]);
}
}
else {
optionalNetworkArray.push(networks[i]);