/**
* Copyright (C) 2010 Cloud.com, Inc. All rights reserved.
*
* This software is licensed under the GNU General Public License v3 or later.
*
* It is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
*/
function afterLoadClusterJSP($leftmenuItem1) {
showMiddleMenu();
clearAddButtonsOnTop();
initAddHostButton($("#midmenu_add_host_button"), "cluster_page", $leftmenuItem1);
initAddPrimaryStorageButton($("#midmenu_add_primarystorage_button"), "cluster_page", $leftmenuItem1);
initDialog("dialog_add_host");
initDialog("dialog_add_pool");
bindEventHandlerToDialogAddPool($("#dialog_add_pool"));
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, 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