Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit 471378b

Browse files
committed
Auto Update code
1 parent c4b3f9a commit 471378b

File tree

12 files changed

+468
-61
lines changed

12 files changed

+468
-61
lines changed

public/static/images/index.png

81.4 KB
Loading

src/app/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
/*
22
* @Author: Copyright(c) 2020 Suwings
33
* @Date: 2021-05-08 10:07:55
4-
* @LastEditTime: 2021-05-18 18:36:58
4+
* @LastEditTime: 2021-07-04 13:46:10
55
* @Description:
66
*/
77

88
import { createApp } from "vue";
99
import App from "./App.vue";
1010
import installElementPlus from "../plugins/element";
1111
import "../assets/common.css";
12+
import "../assets/tools.css";
1213

1314
// eslint-disable-next-line no-unused-vars
1415
import socket from "./service/socket";

src/app/views/InstanceDetail.vue

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
* @Author: Copyright(c) 2020 Suwings
33
* @Date: 2021-05-08 11:53:54
4-
* @LastEditTime: 2021-07-01 18:40:05
4+
* @LastEditTime: 2021-07-04 15:54:31
55
* @Description:
66
-->
77

@@ -29,12 +29,15 @@
2929
<el-col :md="16">
3030
<el-row :gutter="20">
3131
<el-col :md="12" class="row-mt">
32-
<div class="sub-title">实例名称</div>
32+
<div class="sub-title">
33+
<div class="sub-title-title">实例名称</div>
34+
</div>
3335
<el-input v-model="instanceInfo.config.nickname" type="text"> </el-input>
3436
</el-col>
3537
<el-col :md="12" class="row-mt">
36-
<div class="sub-title">类型</div>
37-
<!-- <el-input v-model="instanceInfo.config.type" type="text"> </el-input> -->
38+
<div class="sub-title">
39+
<div class="sub-title-title">类型</div>
40+
</div>
3841
<el-select
3942
v-model="instanceInfo.config.type"
4043
placeholder="请选择"
@@ -45,31 +48,48 @@
4548
</el-select>
4649
</el-col>
4750
<el-col :md="24" class="row-mt">
48-
<div class="sub-title">启动命令</div>
51+
<div class="sub-title">
52+
<div class="sub-title-title">启动命令</div>
53+
<div class="sub-title-info">
54+
适用于任何程序启动命令,列如 cmd.exe /c ping localhost
55+
</div>
56+
</div>
4957
<el-input v-model="instanceInfo.config.startCommand" type="text"> </el-input>
5058
</el-col>
5159
<el-col :md="24" class="row-mt">
52-
<div class="sub-title">工作目录</div>
60+
<div class="sub-title">
61+
<div class="sub-title-title">工作目录</div>
62+
</div>
5363
<el-input v-model="instanceInfo.config.cwd" type="text"> </el-input>
5464
</el-col>
5565
<el-col :md="8" class="row-mt">
56-
<div class="sub-title">输入编码</div>
66+
<div class="sub-title">
67+
<div class="sub-title-title">输入编码</div>
68+
</div>
5769
<el-input v-model="instanceInfo.config.ie" type="text"> </el-input>
5870
</el-col>
5971
<el-col :md="8" class="row-mt">
60-
<div class="sub-title">输出编码</div>
72+
<div class="sub-title">
73+
<div class="sub-title-title">输出编码</div>
74+
</div>
6175
<el-input v-model="instanceInfo.config.oe" type="text"> </el-input>
6276
</el-col>
6377
<el-col :md="8" class="row-mt">
64-
<div class="sub-title">关闭命令</div>
78+
<div class="sub-title">
79+
<div class="sub-title-title">关闭命令</div>
80+
</div>
6581
<el-input v-model="instanceInfo.config.stopCommand" type="text"> </el-input>
6682
</el-col>
6783
<el-col :md="8" class="row-mt" :offset="0">
68-
<div class="sub-title">最大储存(单位 GB)</div>
84+
<div class="sub-title">
85+
<div class="sub-title-title">最大储存(单位GB)</div>
86+
</div>
6987
<el-input v-model="instanceInfo.config.maxSpace" type="text"> </el-input>
7088
</el-col>
7189
<el-col :md="8" class="row-mt" :offset="0">
72-
<div class="sub-title">到期时间</div>
90+
<div class="sub-title">
91+
<div class="sub-title-title">到期时间</div>
92+
</div>
7393
<el-date-picker
7494
v-model="instanceInfo.config.endTime"
7595
type="date"

src/app/views/Instances.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
* @Author: Copyright(c) 2020 Suwings
33
* @Date: 2021-05-08 11:53:54
4-
* @LastEditTime: 2021-07-03 22:56:22
4+
* @LastEditTime: 2021-07-04 13:10:42
55
* @Description:
66
-->
77

@@ -10,26 +10,26 @@
1010
<template #title>分布式服务状态</template>
1111
<template #default>
1212
<el-row :gutter="20">
13-
<el-col :span="6" style="margin: -12px 0px">
14-
<LineLabel>
13+
<el-col :span="6">
14+
<LineLabel size="small">
1515
<template #title>已连接远程服务: </template>
1616
<template #default> {{ availableService.length }} 个 </template>
1717
</LineLabel>
1818
</el-col>
19-
<el-col :span="6" style="margin: -12px 0px">
20-
<LineLabel>
19+
<el-col :span="6">
20+
<LineLabel size="small">
2121
<template #title>不可用远程服务: </template>
2222
<template #default> {{ unavailableService.length }} 个 </template>
2323
</LineLabel>
2424
</el-col>
25-
<el-col :span="6" style="margin: -12px 0px">
26-
<LineLabel>
25+
<el-col :span="6">
26+
<LineLabel size="small">
2727
<template #title>实例总数: </template>
2828
<template #default> {{ instances.length }} 个 </template>
2929
</LineLabel>
3030
</el-col>
31-
<el-col :span="6" style="margin: -12px 0px">
32-
<LineLabel>
31+
<el-col :span="6">
32+
<LineLabel size="small">
3333
<template #title>运行中: </template>
3434
<template #default> {{ startedInstance }} 个 </template>
3535
</LineLabel>

src/app/views/Overview.vue

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
* @Author: Copyright(c) 2020 Suwings
33
* @Date: 2021-05-08 11:53:54
4-
* @LastEditTime: 2021-05-13 13:54:29
4+
* @LastEditTime: 2021-07-04 13:10:56
55
* @Description:
66
-->
77

@@ -12,9 +12,6 @@
1212
<template #title>操作系统数据</template>
1313
<template #default>
1414
<el-row :gutter="20">
15-
<!-- <el-col :span="24" :offset="0">
16-
<div class="overview-info-hr">操作系统数据</div>
17-
</el-col> -->
1815
<el-col :xs="12" :md="6" v-for="(item, index) in computerInfoA" :key="index">
1916
<div class="overview-info-warpper">
2017
<p class="overview-info-title" v-text="item.name"></p>
@@ -35,6 +32,44 @@
3532
</el-row>
3633
</template>
3734
</Panel>
35+
<Panel>
36+
<template #title>分布式服务状态</template>
37+
<template #default>
38+
<el-row :gutter="20">
39+
<el-col :span="6">
40+
<LineLabel size="small">
41+
<template #title>已连接远程服务: </template>
42+
<template #default> 0 个 </template>
43+
</LineLabel>
44+
</el-col>
45+
<el-col :span="6">
46+
<LineLabel size="small">
47+
<template #title>不可用远程服务: </template>
48+
<template #default> 0 个 </template>
49+
</LineLabel>
50+
</el-col>
51+
<el-col :span="6">
52+
<LineLabel size="small">
53+
<template #title>实例总数: </template>
54+
<template #default> 0 个 </template>
55+
</LineLabel>
56+
</el-col>
57+
<el-col :span="6">
58+
<LineLabel size="small">
59+
<template #title>运行中: </template>
60+
<template #default> 0</template>
61+
</LineLabel>
62+
</el-col>
63+
</el-row>
64+
<div v-show="true">
65+
<span style="color: red">
66+
<b>警告:</b> 检测到您有一个或以上远程服务无法建立连接,请前往
67+
<a class="alink" href="./services">分布式服务</a>
68+
功能确认各个远程服务器状态,若不修复此问题,则有部分远程实例您可能无法访问和显示。
69+
</span>
70+
</div>
71+
</template>
72+
</Panel>
3873
</el-col>
3974
</el-row>
4075
<el-row :gutter="20">
@@ -100,7 +135,7 @@
100135

101136
<script>
102137
import Panel from "../../components/Panel";
103-
138+
import LineLabel from "../../components/LineLabel";
104139
export default {
105140
data: function () {
106141
return {
@@ -202,7 +237,7 @@ export default {
202237
};
203238
},
204239
methods: {},
205-
components: { Panel }
240+
components: { Panel, LineLabel }
206241
};
207242
</script>
208243

src/app/views/Services.vue

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
* @Author: Copyright(c) 2020 Suwings
33
* @Date: 2021-05-08 11:53:54
4-
* @LastEditTime: 2021-07-03 22:28:04
4+
* @LastEditTime: 2021-07-04 13:13:42
55
* @Description:
66
-->
77

@@ -20,12 +20,14 @@
2020
<Panel>
2121
<template #title>远程服务节点</template>
2222
<template #default>
23-
<el-tree
24-
:data="remoteNodes"
25-
:props="defaultProps"
26-
:default-expand-all="true"
27-
@node-click="handleNodeClick"
28-
></el-tree>
23+
<div style="min-height: 280px">
24+
<el-tree
25+
:data="remoteNodes"
26+
:props="defaultProps"
27+
:default-expand-all="true"
28+
@node-click="handleNodeClick"
29+
></el-tree>
30+
</div>
2931
</template>
3032
</Panel>
3133
</el-col>
@@ -35,17 +37,36 @@
3537
<div>
3638
<span v-text="displayService.ip + ':' + displayService.port"></span>
3739
&nbsp;
38-
<el-tag size="small">{{ displayService.available ? "已连接" : "不可使用" }}</el-tag>
40+
<el-tag type="success" v-show="displayService.available" size="small">正常</el-tag>
41+
<el-tag type="danger" v-show="!displayService.available" size="small">无法连接</el-tag>
3942
</div>
40-
<el-button class="button" type="text">删除</el-button>
43+
<el-button class="button" type="text" @click="deleteService">删除</el-button>
4144
</template>
4245
<template #default>
46+
<p v-if="!displayService.available" style="color: red">
47+
无法连接到远程服务,此远程服务所在主机的全部信息都将无法正常获取,请确认地址是否正确且服务正常启用。
48+
</p>
4349
<el-descriptions size="mini">
4450
<el-descriptions-item label="UUID">{{ displayService.uuid }}</el-descriptions-item>
4551
<el-descriptions-item label="远程实例数">{{
4652
displayService.instances.length
4753
}}</el-descriptions-item>
4854
</el-descriptions>
55+
<div class="service-address-wrapper">
56+
<div class="row-mt">
57+
<el-input v-model="displayService.ip" size="small">
58+
<template #prepend>地址</template>
59+
</el-input>
60+
</div>
61+
<div class="row-mt">
62+
<el-input v-model="displayService.port" size="small">
63+
<template #prepend>端口</template>
64+
</el-input>
65+
</div>
66+
<div class="row-mt" style="text-align: right">
67+
<el-button size="small">更新地址</el-button>
68+
</div>
69+
</div>
4970
<el-table :data="displayService.instances" stripe style="width: 100%" size="small">
5071
<el-table-column prop="instanceUuid" label="UUID"></el-table-column>
5172
<el-table-column prop="config.nickname" label="实例昵称"></el-table-column>
@@ -124,6 +145,20 @@ export default {
124145
const tAddr = `${service.ip}:${service.port}`;
125146
if (sAddr == tAddr) return (this.displayService = service);
126147
});
148+
},
149+
deleteService() {
150+
this.$confirm("此操作将永久删除该远程服务,是否继续?", "警告", {
151+
confirmButtonText: "删除",
152+
cancelButtonText: "取消",
153+
type: "warning"
154+
})
155+
.then(() => {
156+
this.$message({
157+
type: "success",
158+
message: "删除成功!"
159+
});
160+
})
161+
.catch(() => {});
127162
}
128163
},
129164
components: { Panel, Dialog },

0 commit comments

Comments
 (0)