<!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="sortable" data-field="appId">应用 ID</th>
                    <th class="sortable" data-field="appType">应用类型</th>
                    <th class="sortable" data-field="env">环境</th>
                    <th class="sortable" data-field="repoBranch">分支</th>
                    <th class="sortable" data-field="buildConfig">构建配置</th>
                    <th class="sortable" data-field="packScript">打包脚本</th>
                    <th class="sortable" data-field="packagePath">包路径</th>
                    <th class="sortable" data-field="commitInfo">版本信息</th>
                    <th class="sortable" data-field="buildTime">构建时间</th>
                    <th class="sortable" data-field="result">构建结果</th>
                    <th class="sortable" data-field="buildBy">构建用户</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="item:${list}">
                    <td th:text="${item.appId}">应用 ID</td>
                    <td th:text="${item.appType}">应用类型</td>
                    <td th:text="${item.env}">环境</td>
                    <td th:text="${item.repoBranch}">分支</td>
                    <td>
                        <a class="open-popup" data-title="构建配置" data-size="1000,500" href="#"
                           th:attr="data-url=@{'/app/log/build/'+${item.id} + '/buildconfig'}">查看</a>
                    </td>
                    <td>
                        <a class="open-popup" data-title="打包脚本" data-size="1000,500" href="#"
                           th:attr="data-url=@{'/app/log/build/'+${item.id} + '/packscript'}">查看</a>
                    </td>
                    <td th:text="${item.packagePath}">包路径</td>
                    <td>
                        <a class="open-popup" data-title="版本信息" data-size="1000,500" href="#"
                           th:attr="data-url=@{'/app/log/build/'+${item.id} + '/commitinfo'}">查看</a>
                    </td>
                    <td>
                        <a class="open-popup" data-title="构建时间" data-size="1000,500" href="#"
                           th:attr="data-url=@{'/app/log/build/'+${item.id} + '/buildtime'}">查看</a>
                    </td>
                    <td>
                        <a class="open-popup" data-title="构建结果" data-size="1000,500" href="#"
                           th:attr="data-url=@{'/app/log/build/'+${item.id} + '/result'}">查看</a>
                    </td>
                    <td th:text="${item.buildBy}">构建用户</td>
                    <td>
                        <a class="open-popup" data-title="应用部署" th:attr="data-url=@{'/app/deploy/' + ${item.appId}}"
                           data-size="1000,500" 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>