<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})"></head>

<body class="timo-layout-page">
<div class="layui-card">
    <div class="layui-card-header timo-card-header">
        <span><i class="fa fa-bars"></i> 构建目录</span>
        <i class="layui-icon layui-icon-refresh refresh-btn"></i>
    </div>
    <div class="layui-card-body">
        <div class="timo-table-wrap">
            <table class="layui-table timo-table">
                <thead>
                <tr>
                    <th class="timo-table-checkbox">
                        <label class="timo-checkbox"><input type="checkbox">
                            <i class="layui-icon layui-icon-ok"></i></label>
                    </th>
                    <th class="sortable" data-field="machineIpv4">机器地址</th>
                    <th class="sortable" data-field="dirPath">当前目录</th>
                    <th class="sortable" data-field="mountedOn">所属分区</th>
                    <th class="sortable" data-field="size">分区总容量</th>
                    <th class="sortable" data-field="used">分区已使用</th>
                    <th class="sortable" data-field="avail">分区可用</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="item:${list}">
                    <td><label class="timo-checkbox"><input type="checkbox" th:value="${item.id}">
                        <i class="layui-icon layui-icon-ok"></i></label></td>
                    <td th:text="${item.machineIpv4}">机器地址</td>
                    <td th:text="${item.dirPath}">当前目录</td>
                    <td th:text="${item.mountedOn}">所属分区</td>
                    <td th:text="${item.total}">分区总容量</td>
                    <td th:text="${item.used}">分区已使用</td>
                    <td th:text="${item.avail}">分区可用</td>
                    <td>
                        <a class="open-popup" data-title="磁盘详情" th:attr="data-url=@{'/app/config/build/dir/diskinfo'}"
                           data-size="800,400" href="#">磁盘详情</a>
                        <a class="open-popup" data-title="迁移目录" th:attr="data-url=@{'/app/config/build/dir/edit/'+${item.id}}"
                           data-size="480,320" href="#">迁移到新目录</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <div th:replace="/common/fragment :: page"></div>
    </div>
</div>

<script th:replace="/common/template :: script"></script>
<script type="text/javascript">
</script>
</body>
</html>