Procházet zdrojové kódy

update PackerPageController

reghao před 6 měsíci
rodič
revize
50255c90c5

+ 1 - 17
mgr/src/main/java/cn/reghao/devops/mgr/build/controller/PackerPageController.java

@@ -77,14 +77,6 @@ public class PackerPageController {
         return "/devops/build/packer/add";
     }
 
-    @ApiOperation(value = "打包更新页面", notes = "N")
-    @PreAuthorize("hasRole('ROLE_ADMIN')")
-    @GetMapping("/edit/{id}")
-    public String editPackerPage(@PathVariable("id") PackerConfig packerConfig, Model model) {
-        model.addAttribute("packer", packerConfig);
-        return "/devops/build/packer/edit";
-    }
-
     private void setPackerModel(Model model) {
         List<KeyValue> packTypes = new ArrayList<>();
         for (PackType packType : PackType.values()) {
@@ -95,15 +87,7 @@ public class PackerPageController {
         model.addAttribute("machineIpv4", Machine.IPV4);
     }
 
-    @ApiOperation(value = "打包详情页面", notes = "N")
-    @PreAuthorize("hasRole('ROLE_ADMIN')")
-    @GetMapping("/detail/{id}")
-    public String packerDetailPage(@PathVariable("id") PackerConfig packerConfig, Model model) {
-        model.addAttribute("packer", packerConfig);
-        return "/devops/build/packer/detail";
-    }
-
-    @ApiOperation(value = "添加/修改应用打包配置", notes = "N")
+    @ApiOperation(value = "添加应用打包配置", notes = "N")
     @PreAuthorize("hasRole('ROLE_ADMIN')")
     @PostMapping(produces = MediaType.APPLICATION_JSON_VALUE)
     @ResponseBody

+ 0 - 28
mgr/src/main/resources/templates/devops/build/packer/detail.html

@@ -1,28 +0,0 @@
-<!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">
-        <table class="layui-table timo-detail-table">
-            <tbody>
-            <tr>
-                <th>打包类型</th>
-                <td th:text="${packer.type}"></td>
-            </tr>
-            <tr>
-                <th>打包名字</th>
-                <td th:text="${packer.name}"></td>
-            </tr>
-            <tr>
-                <th>存放位置</th>
-                <td th:text="${packer.targetPath}"></td>
-            </tr>
-            <tr>
-                <th>bin 目录名</th>
-                <td th:text="${packer.binDirname}"></td>
-            </tr>
-            </tbody>
-        </table>
-    </div>
-</body>
-</html>

+ 0 - 45
mgr/src/main/resources/templates/devops/build/packer/edit.html

@@ -1,45 +0,0 @@
-<!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="@{/build/packer}">
-        <input type="hidden" name="id" th:value="${packer.id}"/>
-        <div class="layui-form-item">
-            <label class="layui-form-label">打包类型</label>
-            <div class="layui-input-inline">
-                <input class="layui-input" type="text" readonly name="type" th:value="${packer.type}">
-            </div>
-        </div>
-        <div class="layui-form-item">
-            <label class="layui-form-label">打包名字</label>
-            <div class="layui-input-inline">
-                <input class="layui-input" type="text" readonly name="name" th:value="${packer.name}">
-            </div>
-        </div>
-        <div class="layui-form-item">
-            <label class="layui-form-label">存放位置</label>
-            <div class="layui-input-inline">
-                <input class="layui-input" type="text" name="targetPath" required th:value="${packer.targetPath}">
-            </div>
-        </div>
-        <div class="layui-form-item">
-            <label class="layui-form-label">bin 目录名</label>
-            <div class="layui-input-inline">
-                <input class="layui-input" type="text" name="binDirname" required th:value="${packer.binDirname}">
-            </div>
-        </div>
-        <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>
-<script type="text/javascript">
-</script>
-</body>
-</html>

+ 2 - 4
mgr/src/main/resources/templates/devops/build/packer/index.html

@@ -26,6 +26,7 @@
                     <th class="sortable" data-field="type">打包类型</th>
                     <th class="sortable" data-field="name">打包名字</th>
                     <th class="sortable" data-field="targetPath">存放位置</th>
+                    <th class="sortable" data-field="binDirname">bin 目录名</th>
                     <th>操作</th>
                 </tr>
                 </thead>
@@ -34,11 +35,8 @@
                     <td th:text="${item.type}">打包类型</td>
                     <td th:text="${item.name}">打包名字</td>
                     <td th:text="${item.targetPath}">存放位置</td>
+                    <td th:text="${item.binDirname}">bin 目录名</td>
                     <td>
-                        <a class="open-popup" data-title="详细" th:attr="data-url=@{'/build/packer/detail/'+${item.id}}"
-                           data-size="640,480" href="#">详细</a>
-                        <a class="open-popup" data-title="修改存放位置" th:attr="data-url=@{'/build/packer/edit/'+${item.id}}"
-                           data-size="640,480" href="#">编辑</a>
                         <a class="ajax-delete" th:attr="data-msg='确定要删除 '+ ${item.name} + '?'"
                            th:href="@{'/build/packer/' + ${item.id}}">删除</a>
                     </td>