add host - fix a bug "Unable to execute API command listclusterresponse due to invalid value undefined for parameter podid". (This happened when zonetree is hidden)

This commit is contained in:
Jessica Wang 2010-12-02 17:48:52 -08:00
parent b58c2d1e62
commit 2e28753231
1 changed files with 4 additions and 1 deletions

View File

@ -124,7 +124,10 @@ function buildZoneTree() {
}
function refreshClusterUnderPod($podNode, newClusterName, existingClusterId, noClicking) {
var podId = $podNode.data("podId");
var podId = $podNode.data("podId");
if(podId == null) //e.g. $podNode is not on the screen (when zone tree is hidden) ($podNode.length==0)
return;
$.ajax({
data: createURL("command=listClusters&podid="+podId),
dataType: "json",