bug 7823: refresh data binding when clicking each host node in zonetree (since each host has different cluster info).

This commit is contained in:
Jessica Wang 2011-01-03 19:37:53 -08:00
parent 9249ee199f
commit fc8e582627
2 changed files with 7 additions and 3 deletions

View File

@ -85,9 +85,13 @@ function afterLoadHostJSP() {
var tabContentArray = [$("#tab_content_details"), $("#tab_content_primarystorage"), $("#tab_content_instance"), $("#tab_content_router"), $("#tab_content_systemvm"), $("#tab_content_statistics")];
var afterSwitchFnArray = [hostJsonToDetailsTab, hostJsonToPrimaryStorageTab, hostJsonToInstanceTab, hostJsonToRouterTab, hostJsonToSystemvmTab, hostJsonToStatisticsTab];
switchBetweenDifferentTabs(tabArray, tabContentArray, afterSwitchFnArray);
hostRefreshDataBinding();
}
function hostRefreshDataBinding() {
var $hostNode = $selectedSubMenu.parent();
bindAddHostButton($hostNode);
bindAddHostButton($hostNode);
}
function hostJsonToDetailsTab() {

View File

@ -219,7 +219,7 @@ function buildZoneTree() {
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"), null);
listMidMenuItems(("listHosts&type=Routing&clusterid="+clusterObj.id), hostGetSearchParams, "listhostsresponse", "host", "jsp/host.jsp", afterLoadHostJSP, hostToMidmenu, hostToRightPanel, getMidmenuId, false, ("cluster_"+clusterObj.id+"_host"), hostRefreshDataBinding);
return false;
});