zonetree - clicking host node would populate hosts into middle menu.

This commit is contained in:
Jessica Wang 2010-12-29 19:41:30 -08:00
parent 3da09345c9
commit 0f2f67de80
2 changed files with 30 additions and 3 deletions

View File

@ -848,8 +848,22 @@
</div>
</div>
<div id="cluster_content" style="display: none">
<div class="leftmenu_expandedlist" id="leftmenu_host_node_template" style="display:block">
<div id="host_header" class="leftmenu_content">
<div class="leftmenu_sixthindent">
<div class="leftmenu_arrowloader" id="host_loading_container" style="display:none;"></div>
<div class="leftmenu_arrows white_nonexpanded_close" id="host_arrow">
</div>
<span>Host</span>
</div>
</div>
</div>
<!--
<div id="hosts_container">
</div>
</div>
-->
<div id="primarystorages_container">
</div>
</div>

View File

@ -207,9 +207,19 @@ function buildZoneTree() {
listMidMenuItems(("listHosts&type=Routing&clusterid="+objCluster.id), hostGetSearchParams, "listhostsresponse", "host", "jsp/host.jsp", afterLoadHostJSP, hostToMidmenu, hostToRightPanel, getMidmenuId, false, ("cluster_"+objCluster.id));
return false;
});
});
*/
$("#leftmenu_host_node_template").unbind("click").bind("click", function(event) {
selectRowInZoneTree($(this).find("#host_header"));
hostClearRightPanel();
var clusterObj = $(this).data("clusterObj");
listMidMenuItems(("listHosts&type=Routing&clusterid="+clusterObj.id), hostGetSearchParams, "listhostsresponse", "host", "jsp/host.jsp", afterLoadHostJSP, hostToMidmenu, hostToRightPanel, getMidmenuId, false, ("cluster_"+clusterObj.id+"_host"));
return false;
});
$("#leftmenu_cluster_node_template").unbind("click").bind("click", function(event) {
var $thisNode = $(this);
var $target = $(event.target);
@ -300,6 +310,7 @@ function buildZoneTree() {
return false;
});
/*
$("#leftmenu_host_node_template").unbind("click").bind("click", function(event) {
var $thisNode = $(this);
selectRowInZoneTree($thisNode.find("#host_header"));
@ -327,6 +338,7 @@ function buildZoneTree() {
return false;
});
*/
$("#leftmenu_primarystorage_node_template").unbind("click").bind("click", function(event) {
var $thisNode = $(this);
@ -449,7 +461,8 @@ function podJSONToTreeNode(json, $podNode) {
function clusterJSONToTreeNode(json, $clusterNode) {
$clusterNode.attr("id", "cluster_"+json.id);
$clusterNode.data("jsonObj", json);
$clusterNode.data("jsonObj", json);
$clusterNode.find("#leftmenu_host_node_template").data("clusterObj", json).attr("id",("cluster_"+json.id+"_host"));
$clusterNode.data("id", json.id).data("name", fromdb(json.name));
var clusterName = $clusterNode.find("#cluster_name").text(fromdb(json.name));
clusterName.data("jsonObj", json);