Commit 4d920745059c56184866c6189277b70ddd6c0671

Authored by 648540858
1 parent 5e8a7ce2

添加版本信息展示和wvp配置信息展示

web_src/src/components/control.vue
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;"> 8 <div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;">
9 <span style="font-size: 1rem; font-weight: bold;">控制台</span> 9 <span style="font-size: 1rem; font-weight: bold;">控制台</span>
10 <div style="position: absolute; right: 17rem; top: 0.3rem;"> 10 <div style="position: absolute; right: 17rem; top: 0.3rem;">
11 - 节点选择: <el-select size="mini" @change="chooseMediaChange" style="width: 16rem; margin-right: 1rem;" v-model="mediaServerChoose" placeholder="请选择" default-first-option> 11 + 节点选择: <el-select size="mini" @change="chooseMediaChange" style="width: 18rem; margin-right: 8rem;" v-model="mediaServerChoose" placeholder="请选择" default-first-option>
12 <el-option 12 <el-option
13 v-for="item in mediaServerList" 13 v-for="item in mediaServerList"
14 :key="item.id" 14 :key="item.id"
@@ -28,9 +28,34 @@ @@ -28,9 +28,34 @@
28 </tr> 28 </tr>
29 </table> 29 </table>
30 </div> 30 </div>
31 - <el-button type="primary" slot="reference" size="mini" @click="getServerConfig()">查看服务器配置</el-button> 31 + <el-button type="primary" slot="reference" size="mini" @click="getServerConfig()">媒体服务器配置</el-button>
32 </el-popover> 32 </el-popover>
33 - <el-button style="margin-left: 1rem;" type="danger" size="mini" @click="reStartServer()">重启服务器</el-button> 33 + <el-popover placement="bottom" width="750" height="300" trigger="click">
  34 + <div style="height: 600px;overflow:auto;">
  35 + <div v-for="(value, key, index) in wvpServerConfig">
  36 + {{ key }}:
  37 + <table v-if="key != 'server.port'" class="table-c" cellspacing="0">
  38 + <tr v-for="(subValue, subKey, subIndex) in value">
  39 + <td style="width: 18rem; text-align: right;">{{ subKey }}</td>
  40 + <td style="width: 33rem; text-align:left">{{ subValue }}</td>
  41 + </tr>
  42 + </table>
  43 + <span v-if="key == 'server.port'">{{ value }}</span>
  44 + </div>
  45 +
  46 + <div style="margin-top: 1rem">
  47 + 版本信息:
  48 + <table class="table-c" cellspacing="0">
  49 + <tr v-for="(value, key, index) in wvpServerVersion">
  50 + <td style="width: 18rem; text-align: right;">{{ key }}</td>
  51 + <td style="width: 33rem; text-align:left">{{ value }}</td>
  52 + </tr>
  53 + </table>
  54 + </div>
  55 + </div>
  56 + <el-button type="primary" slot="reference" size="mini" @click="getWVPServerConfig()">信令服务器配置</el-button>
  57 + </el-popover>
  58 + <el-button style="margin-left: 1rem;" type="danger" size="mini" @click="reStartServer()">重启媒体服务器</el-button>
34 </div> 59 </div>
35 </div> 60 </div>
36 <el-row :gutter="30"> 61 <el-row :gutter="30">
@@ -99,7 +124,10 @@ export default { @@ -99,7 +124,10 @@ export default {
99 chartInterval: 0, //更新图表统计图定时任务标识 124 chartInterval: 0, //更新图表统计图定时任务标识
100 allSessionData: [], 125 allSessionData: [],
101 visible: false, 126 visible: false,
  127 + wvpVisible: false,
102 serverConfig: {}, 128 serverConfig: {},
  129 + wvpServerConfig: {},
  130 + wvpServerVersion: {},
103 mediaServer : new MediaServer(), 131 mediaServer : new MediaServer(),
104 mediaServerChoose : null, 132 mediaServerChoose : null,
105 loadCount : 0, 133 loadCount : 0,
@@ -306,12 +334,31 @@ export default { @@ -306,12 +334,31 @@ export default {
306 let that = this; 334 let that = this;
307 this.$axios({ 335 this.$axios({
308 method: 'get', 336 method: 'get',
309 - url: '/zlm/index/api/getServerConfig' 337 + url: '/zlm/' + that.mediaServerChoose +'/index/api/getServerConfig'
310 }).then(function (res) { 338 }).then(function (res) {
311 that.serverConfig = res.data.data[0]; 339 that.serverConfig = res.data.data[0];
312 that.visible = true; 340 that.visible = true;
313 }); 341 });
314 }, 342 },
  343 + getWVPServerConfig: function () {
  344 + let that = this;
  345 + this.$axios({
  346 + method: 'get',
  347 + url: '/api/server/config'
  348 + }).then(function (res) {
  349 + console.log(res)
  350 + that.wvpServerConfig = res.data.data;
  351 + that.wvpVisible = true;
  352 + });
  353 + this.$axios({
  354 + method: 'get',
  355 + url: '/api/server/version'
  356 + }).then(function (res) {
  357 + console.log(res)
  358 + that.wvpServerVersion = res.data.data;
  359 + that.wvpVisible = true;
  360 + });
  361 + },
315 reStartServer: function () { 362 reStartServer: function () {
316 let that = this; 363 let that = this;
317 this.$confirm('此操作将重启媒体服务器, 是否继续?', '提示', { 364 this.$confirm('此操作将重启媒体服务器, 是否继续?', '提示', {