CS-16147: Always show VPC section if advanced zone is present

reviewed-by: jessica
This commit is contained in:
Brian Federle 2012-08-23 11:27:20 -07:00
parent d53b6373de
commit e22e542342
1 changed files with 7 additions and 2 deletions

View File

@ -162,8 +162,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,
@ -173,8 +174,12 @@
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;
}
});
@ -194,7 +199,7 @@
var sectionsToShow = ['networks', 'vpnCustomerGateway'];
if (!havingBasicZones) {
if (havingAdvancedZones) {
sectionsToShow.push('vpc');
}