This commit is contained in:
Hugo Trippaers 2012-08-29 10:48:36 +02:00
commit f128d8e123

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');
}