bug 12869: system page - advanced zone - create guest network - network offerings dropdown - when scope is account, display all network offerings regardless of shared/isolated.

This commit is contained in:
Jessica Wang 2012-01-27 14:29:11 -08:00
parent ecf774a0d7
commit b8958d52a4

View File

@ -775,15 +775,11 @@
scope: { scope: {
label: 'Scope', label: 'Scope',
select: function(args) { select: function(args) {
var array1 = []; var array1 = [];
if(selectedZoneObj.securitygroupsenabled) { array1.push({id: 'zone-wide', description: 'All'});
array1.push({id: 'account-specific', description: 'Account'}); array1.push({id: 'domain-specific', description: 'Domain'});
} array1.push({id: 'account-specific', description: 'Account'});
else {
array1.push({id: 'zone-wide', description: 'All'});
array1.push({id: 'domain-specific', description: 'Domain'});
array1.push({id: 'account-specific', description: 'Account'});
}
args.response.success({data: array1}); args.response.success({data: array1});
args.$select.change(function() { args.$select.change(function() {
@ -857,10 +853,10 @@
var array1 = []; var array1 = [];
var apiCmd = "listNetworkOfferings&state=Enabled"; var apiCmd = "listNetworkOfferings&state=Enabled";
if(selectedZoneObj.networktype == "Advanced") { //Advanced zone if(selectedZoneObj.networktype == "Advanced") { //Advanced zone
if(args.scope == "zone-wide" || args.scope == "domain-specific") if(args.scope == "zone-wide" || args.scope == "domain-specific") {
apiCmd += "&guestiptype=Shared"; apiCmd += "&guestiptype=Shared";
else //args.scope == "account-specific" }
apiCmd += "&guestiptype=Isolated&sourcenatsupported=false"; //args.scope == "account-specific" displays all network offerings
} }
else { //Basic zone else { //Basic zone
apiCmd += "&guestiptype=Shared"; apiCmd += "&guestiptype=Shared";