diff --git a/ui/scripts/cloud.core.cluster.js b/ui/scripts/cloud.core.cluster.js index d345b8c7e1e..cc920c1cf18 100644 --- a/ui/scripts/cloud.core.cluster.js +++ b/ui/scripts/cloud.core.cluster.js @@ -30,20 +30,76 @@ function afterLoadClusterJSP($leftmenuItem1) { clusterJsonToRightPanel($leftmenuItem1); var clusterId = $leftmenuItem1.data("jsonObj").id; var $midmenuContainer = $("#midmenu_container").empty(); + + disableMultipleSelectionInMidMenu(); var $container_host = $("
"); $midmenuContainer.append($container_host); var $header1 = $("#midmenu_itemheader_without_margin").clone().show(); //without margin on top $header1.find("#name").text("Host"); - $container_host.append($header1); - listMidMenuItems2(("listHosts&type=Routing&clusterid="+clusterId), "listhostsresponse", "host", hostToMidmenu, hostToRightPanel, hostGetMidmenuId, false, true, $container_host); + $container_host.append($header1); + //listMidMenuItems2(("listHosts&type=Routing&clusterid="+clusterId), "listhostsresponse", "host", hostToMidmenu, hostToRightPanel, hostGetMidmenuId, false, 1); + var count = 0; + $.ajax({ + cache: false, + data: createURL("command=listHosts&type=Routing&clusterid="+clusterId), + dataType: "json", + async: false, + success: function(json) { + selectedItemsInMidMenu = {}; + var items = json.listhostsresponse.host; + if(items != null && items.length > 0) { + for(var i=0; i