<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header(#{system.server.title})" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="col-sm-12">
        <div class="row">
            <div class="col-sm-6">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><i class="fa fa-microchip"></i> <span th:text="#{system.server.cpu.title}"></span></h5>
                        <div class="ibox-tools">
                            <a class="collapse-link"><i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="close-link"><i class="fa fa-times"></i></a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <table class="table table-hover no-margins">
                            <thead>
                            <tr>
                                <th th:text="#{system.server.table.property}"></th>
                                <th th:text="#{system.server.table.value}"></th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td th:text="#{system.server.cpu.cpuNum}"></td>
                                <td th:text="${server.cpu.cpuNum} + #{system.server.unit.count}"></td>
                            </tr>
                            <tr>
                                <td th:text="#{system.server.cpu.used}"></td>
                                <td th:text="${server.cpu.used} + '%'"></td>
                            </tr>
                            <tr>
                                <td th:text="#{system.server.cpu.sys}"></td>
                                <td th:text="${server.cpu.sys} + '%'"></td>
                            </tr>
                            <tr>
                                <td th:text="#{system.server.cpu.free}"></td>
                                <td th:text="${server.cpu.free} + '%'"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

            <div class="col-sm-6">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><i class="fa fa-ticket"></i> <span th:text="#{system.server.mem.title}"></span></h5>
                        <div class="ibox-tools">
                            <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                            <a class="close-link"><i class="fa fa-times"></i></a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <table class="table table-hover no-margins">
                            <thead>
                            <tr>
                                <th th:text="#{system.server.table.property}"></th>
                                <th th:text="#{system.server.mem.memory}"></th>
                                <th th:text="#{system.server.mem.jvm}"></th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td th:text="#{system.server.mem.total}"></td>
                                <td th:text="${server.mem.total} + 'G'"></td>
                                <td th:text="${server.jvm.total} + 'M'"></td>
                            </tr>
                            <tr>
                                <td th:text="#{system.server.mem.used}"></td>
                                <td th:text="${server.mem.used} + 'G'"></td>
                                <td th:text="${server.jvm.used} + 'M'"></td>
                            </tr>
                            <tr>
                                <td th:text="#{system.server.mem.free}"></td>
                                <td th:text="${server.mem.free} + 'G'"></td>
                                <td th:text="${server.jvm.free} + 'M'"></td>
                            </tr>
                            <tr>
                                <td th:text="#{system.server.mem.usage}"></td>
                                <td th:class="${server.mem.usage gt 80} ? 'text-danger'">[[${server.mem.usage}]]%</td>
                                <td th:class="${server.jvm.usage gt 80} ? 'text-danger'">[[${server.jvm.usage}]]%</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><i class="fa fa-windows"></i> <span th:text="#{system.server.sys.title}"></span></h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                            <div class="col-sm-12">
                                <table class="table table-hover margin bottom">
                                    <tbody>
                                    <tr>
                                        <td th:text="#{system.server.sys.computerName}"></td>
                                        <td th:text="${server.sys.computerName}"></td>
                                        <td th:text="#{system.server.sys.osName}"></td>
                                        <td th:text="${server.sys.osName}"></td>
                                    </tr>
                                    <tr>
                                        <td th:text="#{system.server.sys.computerIp}"></td>
                                        <td th:text="${server.sys.computerIp}"></td>
                                        <td th:text="#{system.server.sys.osArch}"></td>
                                        <td th:text="${server.sys.osArch}"></td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><i class="fa fa-coffee"></i> <span th:text="#{system.server.jvm.title}"></span></h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">

                        <div class="row">
                            <div class="col-sm-12">
                                <table class="table table-hover margin bottom" style="table-layout:fixed;">
                                    <tbody>
                                    <tr>
                                        <td th:text="#{system.server.jvm.name}"></td>
                                        <td th:text="${server.jvm.name}"></td>
                                        <td th:text="#{system.server.jvm.version}"></td>
                                        <td th:text="${server.jvm.version}"></td>
                                    </tr>
                                    <tr>
                                        <td th:text="#{system.server.jvm.startTime}"></td>
                                        <td th:text="${server.jvm.startTime}"></td>
                                        <td th:text="#{system.server.jvm.runTime}"></td>
                                        <td th:text="${server.jvm.runTime}"></td>
                                    </tr>
                                    <tr>
                                        <td colspan="1" th:text="#{system.server.jvm.home}"></td>
                                        <td colspan="3" th:text="${server.jvm.home}"></td>
                                    </tr>
                                    <tr>
                                        <td colspan="1" th:text="#{system.server.sys.userDir}"></td>
                                        <td colspan="3" th:text="${server.sys.userDir}"></td>
                                    </tr>
                                    <tr>
                                        <td colspan="1" th:text="#{system.server.jvm.inputArgs}"></td>
                                        <td colspan="3" th:text="${server.jvm.inputArgs}"></td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><i class="fa fa-hdd-o"></i> <span th:text="#{system.server.disk.title}"></span></h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">

                        <div class="row">
                            <div class="col-sm-12">
                                <table class="table table-hover margin bottom">
                                    <thead>
                                    <tr>
                                        <th th:text="#{system.server.disk.dirName}"></th>
                                        <th th:text="#{system.server.disk.sysTypeName}"></th>
                                        <th th:text="#{system.server.disk.typeName}"></th>
                                        <th th:text="#{system.server.disk.total}"></th>
                                        <th th:text="#{system.server.disk.free}"></th>
                                        <th th:text="#{system.server.disk.used}"></th>
                                        <th th:text="#{system.server.disk.usage}"></th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr th:each="sysFile : ${server.sysFiles}">
                                        <td th:text="${sysFile.dirName}"></td>
                                        <td th:text="${sysFile.sysTypeName}"></td>
                                        <td th:text="${sysFile.typeName}"></td>
                                        <td th:text="${sysFile.total}"></td>
                                        <td th:text="${sysFile.free}"></td>
                                        <td th:text="${sysFile.used}"></td>
                                        <td th:class="${sysFile.usage gt 80} ? 'text-danger'">[[${sysFile.usage}]]%</td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<th:block th:include="include :: footer" />
<script>
    $(".modal").appendTo("body"), $("[data-toggle=popover]").popover(), $(".collapse-link").click(function() {
        var div_ibox = $(this).closest("div.ibox"),
            e = $(this).find("i"),
            i = div_ibox.find("div.ibox-content");
        i.slideToggle(200),
            e.toggleClass("fa-chevron-up").toggleClass("fa-chevron-down"),
            div_ibox.toggleClass("").toggleClass("border-bottom"),
            setTimeout(function() {
                div_ibox.resize();
            }, 50);
    }), $(".close-link").click(function () {
        var div_ibox = $(this).closest("div.ibox");
        div_ibox.remove()
    });
</script>
</html>