|
203 | 203 | } |
204 | 204 | } |
205 | 205 |
|
206 | | - if (selectedZoneObj.securitygroupsenabled == false) { //show network container |
207 | | - //vmWizardShowNetworkContainer($thisPopup); |
| 206 | + if (selectedZoneObj.securitygroupsenabled == false) { //show network container |
208 | 207 | step5ContainerType = 'select-network'; |
209 | 208 | } |
210 | | - else if (selectedZoneObj.securitygroupsenabled == true) { // if security group is enabled |
211 | | - var hasDedicatedDirectTaggedDefaultNetwork = false; |
212 | | - $.ajax({ |
213 | | - url: createURL("listNetworks&type=Shared&domainid="+g_domainid+"&account="+g_account+"&zoneId="+args.currentData.zoneid), |
214 | | - dataType: "json", |
215 | | - async: false, |
216 | | - success: function(json) { |
217 | | - var items = json.listnetworksresponse.network; |
218 | | - if (items != null && items.length > 0) { |
219 | | - for (var i = 0; i < items.length; i++) { |
220 | | - if(items[i].isshared == false && items[i].isdefault == true) { //dedicated, is default one. |
221 | | - var broadcasturi = items[i].broadcasturi; //e.g. "vlan://53" |
222 | | - if(broadcasturi != null && broadcasturi.length > 0) { |
223 | | - var vlanIdString = broadcasturi.substring(7); //e.g. "53" |
224 | | - if(isNaN(vlanIdString) == false) |
225 | | - hasDedicatedDirectTaggedDefaultNetwork = true; |
226 | | - } |
227 | | - } |
228 | | - } |
229 | | - } |
230 | | - } |
231 | | - }); |
232 | | - |
233 | | - //hasDedicatedDirectTaggedDefaultNetwork = true; //for testing only, comment it out before checking in!!!!!!!!!!!! |
234 | | - if(hasDedicatedDirectTaggedDefaultNetwork == true) { |
235 | | - if(confirm("Do you wish to launch your instance on your own private dedicated network?")) { |
236 | | - step5ContainerType = 'select-network'; |
237 | | - } |
238 | | - else { |
239 | | - if(selectedHypervisor == "VMware" || g_directAttachSecurityGroupsEnabled != "true") |
240 | | - step5ContainerType = 'nothing-to-select'; |
241 | | - else |
242 | | - step5ContainerType = 'select-security-group'; |
243 | | - } |
244 | | - } |
245 | | - else { |
246 | | - if(selectedHypervisor == "VMware" || g_directAttachSecurityGroupsEnabled != "true") |
247 | | - step5ContainerType = 'nothing-to-select'; |
248 | | - else |
249 | | - step5ContainerType = 'select-security-group'; |
250 | | - } |
| 209 | + else if (selectedZoneObj.securitygroupsenabled == true) { // if security group is enabled |
| 210 | + if(selectedHypervisor == "VMware" || g_directAttachSecurityGroupsEnabled != "true") |
| 211 | + step5ContainerType = 'nothing-to-select'; |
| 212 | + else |
| 213 | + step5ContainerType = 'select-security-group'; |
251 | 214 | } |
252 | 215 |
|
253 | 216 | //step5ContainerType = 'nothing-to-select'; //for testing only, comment it out before checking in!!!!!!!!!!!! |
|
0 commit comments