diff --git a/ui/scripts/cloud.core.host.js b/ui/scripts/cloud.core.host.js index bf8c7803726..4f26be1eb8e 100644 --- a/ui/scripts/cloud.core.host.js +++ b/ui/scripts/cloud.core.host.js @@ -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() { diff --git a/ui/scripts/cloud.core.resource.js b/ui/scripts/cloud.core.resource.js index d725138c52b..652d6d846c4 100644 --- a/ui/scripts/cloud.core.resource.js +++ b/ui/scripts/cloud.core.resource.js @@ -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; });