|
|
@@ -1,49 +1,54 @@
|
|
|
<!DOCTYPE html>
|
|
|
<html xmlns:th="http://www.thymeleaf.org"
|
|
|
xmlns:mo="https://gitee.com/aun/Timo">
|
|
|
-<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})"></head>
|
|
|
+<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
|
|
|
+ <link rel="stylesheet" th:href="@{/lib/zTree_v3/css/zTreeStyle/zTreeStyle.css}" type="text/css">
|
|
|
+</head>
|
|
|
|
|
|
<body class="timo-layout-page">
|
|
|
-<div class="layui-card" th:attr="data-url=@{'/app/build/list?env=' + ${env}}">
|
|
|
+<div class="layui-card">
|
|
|
<div class="layui-card-header timo-card-header">
|
|
|
- <span><i class="fa fa-bars"></i> 构建部署</span>
|
|
|
+ <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="layui-row timo-card-screen put-row">
|
|
|
- <div class="pull-left layui-form-pane">
|
|
|
- <div class="layui-inline">
|
|
|
- <label class="layui-form-label">环境</label>
|
|
|
- <div class="layui-input-block timo-search-status">
|
|
|
- <select id="getPageByEnv" class="timo-search-select" name="env" onchange="getPageByCriteria()"
|
|
|
- mo:dict="ENVIRONMENT" mo-selected="${env}"></select>
|
|
|
+ <div class="layui-row timo-card-screen put-row">
|
|
|
+ <div class="pull-left layui-form-pane">
|
|
|
+ <div class="layui-inline">
|
|
|
+ <label class="layui-form-label">环境</label>
|
|
|
+ <div class="layui-input-block timo-search-status">
|
|
|
+ <select id="getPageByEnv" class="timo-search-select" name="env" onchange="getPageByCriteria()"
|
|
|
+ mo:dict="ENVIRONMENT" mo-selected="${env}"></select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="layui-inline">
|
|
|
- <label class="layui-form-label">类型</label>
|
|
|
- <div class="layui-input-block timo-search-status">
|
|
|
- <select id="getPageByType" class="timo-search-select" name="type" onchange="getPageByCriteria()"
|
|
|
- mo:dict="APP_TYPE" mo-selected="${type}"></select>
|
|
|
+ <div class="layui-inline">
|
|
|
+ <label class="layui-form-label">类型</label>
|
|
|
+ <div class="layui-input-block timo-search-status">
|
|
|
+ <select id="getPageByType" class="timo-search-select" name="type" onchange="getPageByCriteria()"
|
|
|
+ mo:dict="APP_TYPE" mo-selected="${type}"></select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="layui-inline timo-search-box">
|
|
|
- <label class="layui-form-label">应用名</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <input type="text" name="appName" th:value="${param.appName}" placeholder="请输入应用名"
|
|
|
- autocomplete="off" class="layui-input">
|
|
|
+ <div class="layui-inline timo-search-box">
|
|
|
+ <label class="layui-form-label">应用</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <input type="text" name="appName" th:value="${param.appName}" placeholder="请输入应用名"
|
|
|
+ autocomplete="off" class="layui-input">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-inline">
|
|
|
+ <button class="layui-btn timo-search-btn">
|
|
|
+ <i class="fa fa-search"></i>
|
|
|
+ </button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="layui-inline">
|
|
|
- <button class="layui-btn timo-search-btn">
|
|
|
- <i class="fa fa-search"></i>
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="pull-right">
|
|
|
- <div class="btn-group-right">
|
|
|
- <button class="layui-btn">
|
|
|
- <i class="fa fa-recycle"><a class="ajax-post" th:href="@{/api/app/bd/reset}">重置</a></i>
|
|
|
- </button>
|
|
|
+ <div class="pull-right">
|
|
|
+ <div class="btn-group-right">
|
|
|
+ <button class="layui-btn open-popup" data-title="添加应用" th:attr="data-url=@{/app/bd/add}"
|
|
|
+ data-size="640,480">
|
|
|
+ <i class="fa fa-plus"></i> 添加
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -51,47 +56,36 @@
|
|
|
<table class="layui-table timo-table">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
- <th class="sortable" data-field="appName">应用</th>
|
|
|
- <th class="sortable" data-field="appType">类型</th>
|
|
|
- <th class="sortable" data-field="repoBranch">分支</th>
|
|
|
- <th class="sortable" data-field="bindPorts">监听端口</th>
|
|
|
- <th class="sortable" data-field="commitId">当前版本</th>
|
|
|
- <th class="sortable" data-field="commitTime">提交时间</th>
|
|
|
- <th class="sortable" data-field="buildTime">构建时间</th>
|
|
|
- <th class="sortable" data-field="result">结果</th>
|
|
|
- <th class="sortable" data-field="buildBy">用户</th>
|
|
|
+ <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="appName">域名</th>
|
|
|
+ <th class="sortable" data-field="appId">前缀</th>
|
|
|
+ <th class="sortable" data-field="repoBranch">最大文件</th>
|
|
|
+ <th class="sortable" data-field="appType">简介</th>
|
|
|
<th>操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<tr th:each="item:${list}">
|
|
|
- <!--<td><label class="timo-checkbox"><input type="checkbox" th:value="${item.appId}">
|
|
|
- <i class="layui-icon layui-icon-ok"></i></label>
|
|
|
- </td>-->
|
|
|
- <td>
|
|
|
- <a class="open-popup" data-title="应用配置详情" data-size="1200,500" href="#"
|
|
|
- th:text="${item.appName}" th:attr="data-url=@{'/app/config/app/detail/'+${item.appId}}"></a>
|
|
|
- </td>
|
|
|
- <td th:text="${item.appType}">类型</td>
|
|
|
- <td th:text="${item.repoBranch}">分支</td>
|
|
|
- <td th:text="${item.bindPorts}">监听端口</td>
|
|
|
- <td th:text="${item.commitId}">当前版本</td>
|
|
|
- <td th:text="${item.commitTime}">提交时间</td>
|
|
|
- <td th:text="${item.buildTime}">构建时间</td>
|
|
|
<td>
|
|
|
- <a class="open-popup build-result" data-title="构建结果" href="#"
|
|
|
- th:text="${item.buildResult}" th:attr="data-url=@{'/app/bd/build/result?buildLogId='+${item.buildLogId}}"></a>
|
|
|
+ <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.buildBy}">用户</td>
|
|
|
+ <td th:text="${item.bindDomain}">域名</td>
|
|
|
+ <td th:text="${item.prefix}">前缀</td>
|
|
|
+ <td th:text="${item.maxSize}">最大文件</td>
|
|
|
+ <td th:text="${item.description}">简介</td>
|
|
|
<td>
|
|
|
- <a class="ajax-post" th:href="@{'/api/app/bd/update/'+${item.appId}}">更新</a>
|
|
|
- <a class="ajax-post" th:href="@{'/api/app/bd/build/'+${item.appId}}">构建</a>
|
|
|
- <a class="open-popup"
|
|
|
- th:attr="data-title=@{${item.appId} + ' 部署列表'}, data-url=@{'/app/bd/deploy?appId=' + ${item.appId} + '&buildLogId=' + ${item.buildLogId}}"
|
|
|
- data-size="1000,500" href="#">部署</a>
|
|
|
- <a class="ajax-redirect" th:href="@{'/api/app/bd/packageurl/'+${item.buildLogId}}">下载</a>
|
|
|
- <a class="open-popup" th:attr="data-title=@{${item.appId} + ' 历史构建列表'}, data-url=@{'/app/bd/build/history?appId='+${item.appId}}"
|
|
|
- data-size="max" href="#">历史构建</a>
|
|
|
+ <a class="open-popup" data-title="应用详细信息" th:attr="data-url=@{'/app/config/app/detail/'+${item.id}}"
|
|
|
+ data-size="1200,500" href="#">详细</a>
|
|
|
+ <a class="open-popup" data-title="编辑" th:attr="data-url=@{'/app/config/app/edit/'+${item.id}}"
|
|
|
+ data-size="1200,500" href="#">编辑</a>
|
|
|
+ <a class="ajax-delete" th:attr="data-msg='确定要删除 '+ ${item.id}"
|
|
|
+ th:href="@{'/api/app/config/app/' + ${item.id}}">删除</a>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
@@ -105,6 +99,8 @@
|
|
|
<script type="text/javascript" th:src="@{/js/plugins/jquery-2.2.4.min.js}"></script>
|
|
|
<script type="text/javascript">
|
|
|
function getPageByCriteria() {
|
|
|
+ console.log('select 事件')
|
|
|
+
|
|
|
var envSelectedOption = $("#getPageByEnv option:selected")
|
|
|
var envParam = envSelectedOption.text()
|
|
|
|
|
|
@@ -114,19 +110,6 @@
|
|
|
url = '?env=' + envParam + '&type=' + typeParam
|
|
|
window.location.href = window.location.pathname + url;
|
|
|
}
|
|
|
-
|
|
|
- $(".build-result").each(function () {
|
|
|
- var text = $(this).text().trim()
|
|
|
- if (text === '尚未构建') {
|
|
|
- $(this).css("color", "#4169e1")
|
|
|
- } else if (text === '正在构建') {
|
|
|
- $(this).css("color", "#e3cf57")
|
|
|
- } else if (text === '构建成功') {
|
|
|
- $(this).css("color", "#009688")
|
|
|
- } else if (text === '构建失败') {
|
|
|
- $(this).css("color", "#ff0000")
|
|
|
- }
|
|
|
- })
|
|
|
</script>
|
|
|
</body>
|
|
|
</html>
|