Browse Source

更新前端页面

reghao 2 years ago
parent
commit
47d585588e

+ 4 - 1
manager/src/main/resources/application-dev.yml

@@ -11,4 +11,7 @@ spring:
       database: "reghao_log_rdb"
       authentication-database: admin
       username: dev
-      password: Dev@123456
+      password: Dev@123456
+webhook:
+  name: ding-cicd
+  url: https://oapi.dingtalk.com/robot/send?access_token=2ede844511f6a12a0429a25585222ef1f0eb99094421ea4b3155f17fda0f4662

+ 4 - 1
manager/src/main/resources/application-test.yml

@@ -4,4 +4,7 @@ spring:
   datasource:
     url: jdbc:mysql://192.168.0.110:3306/reghao_devops_tdb?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8
     username: test
-    password: Test@123456
+    password: Test@123456
+webhook:
+  name: ding-cicd
+  url: https://oapi.dingtalk.com/robot/send?access_token=2ede844511f6a12a0429a25585222ef1f0eb99094421ea4b3155f17fda0f4662

+ 1 - 8
manager/src/main/resources/templates/app/config/app/index.html

@@ -45,16 +45,9 @@
                 <div class="pull-right">
                     <div class="btn-group-right">
                         <button class="layui-btn open-popup" data-title="添加应用" th:attr="data-url=@{/app/config/app/add}"
-                                data-size="1200,600">
+                                data-size="max">
                             <i class="fa fa-plus"></i> 添加
                         </button>
-                        <div class="btn-group">
-                            <button class="layui-btn">启用/禁用<span class="caret"></span></button>
-                            <dl class="layui-nav-child layui-anim layui-anim-upbit">
-                                <dd><a class="ajax-status" th:href="@{/api/app/config/app/enable}">批量删除</a></dd>
-                                <dd><a class="ajax-status" th:href="@{/api/app/config/app/disable}">禁用</a></dd>
-                            </dl>
-                        </div>
                     </div>
                 </div>
             </div>

+ 8 - 7
manager/src/main/resources/templates/app/stat/applog.html

@@ -20,18 +20,19 @@
                 </div>
             </div>
         </div>
-        <div id="terminal" class="timo-table-wrap">
+        <div id="terminal">
         </div>
     </div>
 </div>
 </body>
-
+<script th:replace="/common/template :: script"></script>
 <script type="text/javascript" th:src="@{/js/plugins/jquery-3.4.1.min.js}"></script>
 <script type="text/javascript" th:src="@{/js/websocket.js}"></script>
 <script type="text/javascript" th:src="@{/js/xterm.js}"></script>
 <script type="text/javascript" th:inline="javascript">
     function getPageByEnv() {
         console.log('切换机器')
+        layer.msg('切换机器', {offset: '15px', time: 5000, icon: 1});
     }
 
     openTerminal();
@@ -42,16 +43,16 @@
             rows: 30,
             cursorBlink: true, // 光标闪烁
             cursorStyle: "block", // 光标样式  null | 'block' | 'underline' | 'bar'
-            scrollback: 100, //回滚
+            scrollback: 50, //回滚
             tabStopWidth: 8, //制表宽度
             screenKeys: true
         });
 
-        term.on('data', function (data) {
-            // 键盘输入时的回调函数
-            client.sendClientData(data);
-        });
         term.open(document.getElementById('terminal'));
+        // 键盘输入时的回调函数
+        /*term.on('data', function (data) {
+            client.sendClientData(data);
+        });*/
         //在页面上显示连接中...
         term.write('Connecting...');
         //执行连接操作

+ 3 - 3
manager/src/main/resources/templates/app/stat/index1.html

@@ -48,7 +48,7 @@
                 <tr>
                     <th class="sortable" data-field="appName">应用</th>
                     <th class="sortable" data-field="bindPorts">监听端口</th>
-                    <th class="sortable" data-field="totalDeployed">部署数量</th>
+                    <th class="sortable" data-field="totalDeployed">部署数量</th>
                     <th>运行状态</th>
                 </tr>
                 </thead>
@@ -59,7 +59,7 @@
                            th:text="${item.appName}" th:attr="data-url=@{'/app/config/app/detail/'+${item.appId}}"></a>
                     </td>
                     <td th:text="${item.bindPorts}">监听端口</td>
-                    <td th:text="${item.totalDeployed}">部署数量</td>
+                    <td th:text="${item.totalDeployed}">部署数量</td>
                     <td>
                         <a class="open-popup"
                            th:attr="data-title=${item.appName} + ' - 运行状态', data-url=@{'/app/stat/detail/'+${item.appId}}"
@@ -67,7 +67,7 @@
                         </a>
                         <a class="open-popup"
                            th:attr="data-title=${item.appName} + ' - 运行日志', data-url=@{'/app/stat/log/'+${item.appId}}"
-                           data-size="1280,720" href="#">日志
+                           data-size="max" href="#">日志
                         </a>
                     </td>
                 </tr>

+ 0 - 3
manager/src/main/resources/templates/app/stat/index2.html

@@ -32,9 +32,6 @@
                         <a class="ajax-post" th:href="@{'/api/app/status/stop/'+${item.appId}+'/'+${item.machineId}}">停止</a>
                         <a class="ajax-post" th:href="@{'/api/app/status/start/'+${item.appId}+'/'+${item.machineId}}">启动</a>
                         <a class="ajax-get" th:href="@{'/api/app/status/'+${item.appId}+'/'+${item.machineId}}">当前状态</a>
-                        <a class="open-popup" th:attr="data-title=${item.appName} + ' - 运行日志',
-                            data-url=@{'/app/stat/log?app='+${item.appId}+'&host='+${item.machineIpv4}}"
-                            data-size="960,480" href="#">运行日志</a>
                     </td>
                 </tr>
                 </tbody>