<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})"></head>
<body>
    <div class="timo-detail-page">
        <div class="timo-detail-title">基本信息</div>
        <table class="layui-table timo-detail-table">
            <tbody>
            <tr>
                <th>应用 ID</th>
                <td th:text="${app.appId}"></td>
                <th>应用名称</th>
                <td th:text="${app.appName}"></td>
                <th>应用描述</th>
                <td th:text="${app.description}"></td>
            </tr>
            <tr>
                <th>所属环境</th>
                <td th:text="${app.env}"></td>
                <th>应用类型</th>
                <td th:text="${app.appType}"></td>
            </tr>
            <tr>
                <th>应用仓库</th>
                <td th:text="${app.appRepo}"></td>
                <th>仓库分支</th>
                <td th:text="${app.repoBranch}"></td>
            </tr>
            </tbody>
        </table>
        <div class="timo-detail-title">通知配置</div>
        <table class="layui-table timo-detail-table">
            <tbody>
            <tr th:each="item:${app.notifyGroups}">
                <th>通知账户</th>
                <td th:text="${item.notifyAccountId}"></td>
                <th>通知类型</th>
                <td th:text="${item.notifyType}"></td>
                <th>通知组</th>
                <td th:text="${item.groupId}"></td>
            </tr>
            </tbody>
        </table>
        <div class="timo-detail-title">构建配置</div>
        <table class="layui-table timo-detail-table">
            <tbody>
            <tr>
                <th>代码目录</th>
                <td th:text="${app.codeDirname}"></td>
                <th>编译主目录</th>
                <td th:text="${app.compileHome}"></td>
                <th>可执行文件名</th>
                <td th:text="${app.execBinName}"></td>
            </tr>
            <tr>
                <th>打包脚本</th>
                <td>
                    <textarea class="layui-textarea" readonly="readonly" th:text="${app.packScript}"></textarea>
                </td>
            </tr>
            <tr>
                <th>仓库类型</th>
                <td th:text="${app.repoAuthConfig.type}"></td>
                <th>仓库认证名字</th>
                <td th:text="${app.repoAuthConfig.name}"></td>
                <th>认证类型</th>
                <td th:text="${app.repoAuthConfig.authType}"></td>
            </tr>
            <tr>
                <th>编译器类型</th>
                <td th:text="${app.compilerConfig.type}"></td>
                <th>编译器名字</th>
                <td th:text="${app.compilerConfig.name}"></td>
                <th>编译命令</th>
                <td th:text="${app.compilerConfig.compileCmd}"></td>
            </tr>
            <tr>
                <th>打包类型</th>
                <td th:text="${app.packerConfig.type}"></td>
                <th>打包名字</th>
                <td th:text="${app.packerConfig.name}"></td>
                <th>打包路径</th>
                <td th:text="${app.packerConfig.targetPath}"></td>
            </tr>
            </tbody>
        </table>
        <div class="timo-detail-title">部署配置</div>
        <table class="layui-table timo-detail-table">
            <tbody>
            <tr th:each="item:${app.deployConfigs}">
                <th>机器 ID</th>
                <td th:text="${item.machineId}"></td>
                <th>机器地址</th>
                <td th:text="${item.machineIpv4}"></td>
                <th>启动脚本</th>
                <td>
                    <textarea class="layui-textarea" readonly="readonly" th:text="${item.startScript}"></textarea>
                </td>
                <th th:if="${item?.packType} != 'docker'">启动目录</th>
                <td th:if="${item?.packType} != 'docker'" th:text="${item.startHome}"></td>
            </tr>
            </tbody>
        </table>
        <div class="timo-detail-title">运行配置</div>
        <table class="layui-table timo-detail-table">
            <tbody>
            <tr>
                <th>HTTP 端口</th>
                <td th:text="${app.runningConfig?.httpPort}"></td>
                <th>健康检查</th>
                <td th:text="${app.runningConfig?.healthCheck}"></td>
            </tr>
            </tbody>
        </table>
    </div>
<script th:replace="/common/template :: script"></script>
</body>
</html>