/**
 * 终端服务器状态
 */
var name = $("#sel").val();
var dataTable = null;
var i;

function load() {
    $.ajax({
        type: "POST",
        url: "/pqs9900/serverstate/getServerAll",
        data: "",
        beforeSend: function () {
            i = ityzl_SHOW_LOAD_LAYER();
        },
        success: function (data) {
            var heightTemp = screen.height;
            //没有权限的请求
            if (data == 300) {
                location.href = '/pqs9900/auth/unauthorized';
                //没有登陆的请求
            } else if (data == 301) {
                location.href = '/pqs9900';
            } else {

            }
            //***********关闭loading
            ityzl_CLOSE_LOAD_LAYER(i);
        }
    });
}

$(document).ready(function () {
    load();
});

function modifyCss(table) {
    dataTable.buttons().container().css("display", "inline-block");
    dataTable.buttons().container().css("float", "right");
    dataTable.buttons().container().css("top", "4px");
    dataTable.buttons().container().find("a").prepend("<i class='glyphicon glyphicon-share'></i>");
    dataTable.buttons().container().appendTo('.header');
    dataTable.buttons().container().after($("#fliteData")[0]);
}

function serverStateDetail(serverIndex) {
}

//搜索表中的数据
function searchResult(value) {
    dataTable.search(value).draw();
}