From 5c1ceb4bf1f08a23715ee52937eccf1fe8b4c304 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 30 Dec 2010 17:46:16 -0800 Subject: [PATCH] cluster page - after adding a host, cluster node will expand and host node will be clicked automatically. --- ui/scripts/cloud.core.pod.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ui/scripts/cloud.core.pod.js b/ui/scripts/cloud.core.pod.js index 0fb78380b10..97b93ce273c 100644 --- a/ui/scripts/cloud.core.pod.js +++ b/ui/scripts/cloud.core.pod.js @@ -522,7 +522,20 @@ function bindAddHostButton($leftmenuItem1) { success: function(json) { $thisDialog.find("#spinning_wheel").hide(); $thisDialog.dialog("close"); - //expandClusterNodeAfterAddHost(clusterRadio, podId, newClusterName, clusterId, $thisDialog); //expand cluster node to see host node + + var item = json.addhostresponse.host; + + var $podArrow = $("#pod_"+podId).find("#pod_arrow"); + if($podArrow.hasClass("expanded_close")) { + $podArrow.click(); + } + + var $clusterArrow = $("#cluster_"+clusterId).find("#cluster_arrow"); + if($clusterArrow.hasClass("expanded_close")) { + $clusterArrow.click(); + } + + $("#cluster_"+clusterId+"_host").click(); }, error: function(XMLHttpResponse) { handleError(XMLHttpResponse, function() {