CS-16147: Always show VPC section and VPN customer Gateway if advanced zone is present

This commit is contained in:
Pranav Saxena 2012-08-29 13:28:00 +05:30
parent ad78a0e918
commit d134a63ea8
1 changed files with 9 additions and 3 deletions

View File

@ -165,8 +165,9 @@
preFilter: function(args) {
var havingSecurityGroupNetwork = false;
var havingBasicZones = false;
var havingAdvancedZones = true;
// Get basic zones
// Get zone types
$.ajax({
url: createURL('listZones'),
async: false,
@ -176,9 +177,14 @@
var basicZones = $.grep(zones, function(zone) {
return zone.networktype == 'Basic';
});
var advancedZones = $.grep(zones, function(zone) {
return zone.networktype == 'Advanced';
});
havingBasicZones = basicZones.length ? true : false;
}
havingAdvancedZones = advancedZones.length ? true : false;
}
});
$.ajax({
@ -197,7 +203,7 @@
var sectionsToShow = ['networks'];
if (!havingBasicZones) {
if (havingAdvancedZones) {
sectionsToShow.push('vpc');
sectionsToShow.push('vpnCustomerGateway');
}