bug 7641: resource page - Add Pod dialog, Add Host dialog - zone dropdown field might be empty (e.g. before first zone is created). Skip API call if zone field is empty.

This commit is contained in:
Jessica Wang 2010-12-22 10:42:36 -08:00
parent fe6824a66b
commit 9fd24869fa

View File

@ -324,6 +324,8 @@ function initAddPodShortcut() {
$zoneDropdown.bind("change", function(event) {
var zoneId = $(this).val();
if(zoneId == null)
return;
$.ajax({
data: createURL("command=listZones&id="+zoneId),
dataType: "json",
@ -484,6 +486,8 @@ function initAddHostShortcut() {
$dialogAddHost.find("#zone_dropdown").bind("change", function(event) {
var zoneId = $(this).val();
if(zoneId == null)
return;
$.ajax({
data: createURL("command=listPods&zoneId="+zoneId),
dataType: "json",