fix: 隐藏了ID没法添加Agent

This commit is contained in:
naiba 2021-01-09 09:34:27 +08:00
parent 397a233074
commit e3dad37670
2 changed files with 5 additions and 12 deletions

View File

@ -16,6 +16,7 @@
<th>权重</th>
<th>备注</th>
<th>IP</th>
<th>ID</th>
<th>密钥</th>
<th>管理</th>
</tr>
@ -26,6 +27,7 @@
<td>{{$server.DisplayIndex}}</td>
<td>{{$server.Name}}</td>
<td>{{$server.Host.IP}}</td>
<td>{{$server.ID}}</td>
<td>{{$server.Secret}}</td>
<td>
<div class="ui mini icon buttons">

View File

@ -104,7 +104,8 @@
},
mounted() {
$('.yellow.info.icon').popup({
popup: '.ui.content.popup'
popup: '.ui.content.popup',
exclusive: true,
});
},
methods: {
@ -172,7 +173,7 @@
ws.onmessage = function (evt) {
const oldServers = statusCards.servers
statusCards.servers = JSON.parse(evt.data)
for (let i = 0; i < statusCards.servers.length; i++) {
for (let i = 0; i < statusCards.servers.length; i++) {
const ns = statusCards.servers[i];
if (!ns.Host) ns.live = false
else {
@ -183,16 +184,6 @@
ns.live = true
}
}
for (let j = 0; j < oldServers.length; j++) {
const os = oldServers[j];
if (ns.ID == os.ID) {
break
}
// 新加入的仔
$('#' + ns.ID + ' .yellow.info.icon').popup({
popup: '.ui.content.popup'
});
}
}
}
ws.onclose = function () {