CLOUDSTACK-4702: UI > Network menu > Add Guest Network dialog > UI shouldn't pass null zoneid to listnetworkofferings API when zone dropdown is empty (i.e. when no advanced zone exists).

This commit is contained in:
Jessica Wang 2013-09-18 16:43:18 -07:00
parent 3ab8d8d8f2
commit 723ef6e495
1 changed files with 8 additions and 1 deletions

View File

@ -450,7 +450,14 @@ var addGuestNetworkDialog = {
label: 'label.network.offering',
docID: 'helpGuestNetworkZoneNetworkOffering',
dependsOn: ['zoneId', 'scope'],
select: function(args) {
select: function(args) {
if(args.$form.find('.form-item[rel=zoneId]').find('select').val() == null || args.$form.find('.form-item[rel=zoneId]').find('select').val().length == 0) {
args.response.success({
data: null
});
return;
}
var data = {
state: 'Enabled',
zoneid: args.$form.find('.form-item[rel=zoneId]').find('select').val()