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

<body>
<div class="layui-form timo-compile">
    <form th:action="@{/api/app/config/app/deploy/update}">
        <input type="hidden" name="machineId" th:value="${appDeployConfig.machineHost.machineId}"/>
        <table class="layui-table timo-detail-table">
            <tbody>
            <tr>
                <th>
                    <label class="layui-form-label">机器地址</label>
                </th>
                <td>
                    <div class="layui-form-item">
                        <div class="layui-input-inline">
                            <input class="layui-input" type="text" name="machineIpv4" readonly th:value="${appDeployConfig.machineHost.machineIpv4}">
                        </div>
                    </div>
                </td>
                <th>
                    <label class="layui-form-label">应用 ID</label>
                </th>
                <td >
                    <div class="layui-form-item">
                        <div class="layui-input-inline">
                            <input class="layui-input" type="text" name="appId" readonly th:value="${appDeployConfig.appConfig.appId}">
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <th>
                    <label class="layui-form-label">打包类型</label>
                </th>
                <td>
                    <div class="layui-form-item">
                        <div class="layui-input-inline">
                            <input class="layui-input" type="text" name="packType" readonly th:value="${appDeployConfig.appConfig.packerConfig.type}">
                        </div>
                    </div>
                </td>
                <span th:if="${appDeployConfig.appConfig.packerConfig.type} ne 'docker' ">
                <th>
                    <label class="layui-form-label required">启动目录</label>
                </th>
                <td>
                    <div class="layui-form-item">
                        <div class="layui-input-inline">
                            <input class="layui-input" type="text" name="startHome" th:value="${appDeployConfig.startHome}">
                        </div>
                    </div>
                </td>
                </span>
            </tr>
            <tr>
                <th>
                    <label class="layui-form-label">启动脚本</label>
                </th>
                <td>
                    <div class="layui-form-item">
                        <div class="layui-input-inline">
                            <textarea class="layui-textarea" name="startScript" th:text="${appDeployConfig.startScript}"></textarea>
                        </div>
                    </div>
                </td>
            </tr>
            <span th:if="${appDeployConfig.appConfig.packerConfig.type} ne 'docker' ">
                <tr>
                <th>
                    <label class="layui-form-label required">解包脚本</label>
                </th>
                <td>
                    <div class="layui-form-item">
                        <div class="layui-input-inline">
                            <textarea class="layui-textarea" name="unpackScript" th:text="${appDeployConfig.unpackScript}"></textarea>
                        </div>
                    </div>
                </td>
                </tr>
            </span>
            </tbody>
        </table>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
<script th:replace="/common/template :: script"></script>
</body>
</html>