Merge pull request #54 from ilay1678/master
调整状态卡片上下空白高度 Co-authored-by: ilay1678 <7021399+ilay1678@users.noreply.github.com>
This commit is contained in:
commit
c4f6837def
@ -10,16 +10,20 @@
|
||||
|
||||
<div class="ui styled fluid accordion" v-for="group in groups">
|
||||
<div class="active title"><i class="dropdown icon"></i>@#(group.Tag!==''?group.Tag:'默认')#@</div>
|
||||
<div class="active content"><div class="ui four stackable status cards"> <div v-for='server in group.data' :id="server.ID" class="card">
|
||||
<div class="content" v-if='server.Host'>
|
||||
<div class="active content">
|
||||
<div class="ui four stackable status cards">
|
||||
<div v-for='server in group.data' :id="server.ID" class="ui card">
|
||||
<div class="content" v-if='server.Host' style="margin-top: 10px;padding-bottom: 5px">
|
||||
<div class="header"><i :class="server.Host.CountryCode + ' flag'"></i><i
|
||||
v-if='server.Host.Platform == "darwin"' class="apple icon"></i><i
|
||||
v-if='server.Host.Platform == "linux"' class="linux icon"></i><i
|
||||
v-if='server.Host.Platform == "windows"' class="windows icon"></i><i
|
||||
v-if='server.Host.Platform == "freebsd"' class="freebsd icon"></i>@#server.Name +
|
||||
v-if='server.Host.Platform == "freebsd"' class="freebsd icon"></i>@#server.Name
|
||||
+
|
||||
(server.live?'':' [已离线]')#@
|
||||
<i class="yellow info circle icon"></i>
|
||||
<div class='ui content popup'>
|
||||
<div class="ui divider" style="margin-bottom: 5px"></div>
|
||||
<div class='ui content popup' style="margin-bottom: 0">
|
||||
系统:@#server.Host.Platform#@-@#server.Host.PlatformVersion#@ [<span
|
||||
v-if='server.Host.Virtualization'>@#server.Host.Virtualization#@:</span>@#server.Host.Arch#@]<br>
|
||||
CPU:@#server.Host.CPU#@<br>
|
||||
@ -92,7 +96,9 @@
|
||||
<p>@#server.Name#@</p>
|
||||
<p>节点已离线</p>
|
||||
</div>
|
||||
</div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -105,7 +111,7 @@
|
||||
delimiters: ['@#', '#@'],
|
||||
data: {
|
||||
data: initData,
|
||||
groups:[],
|
||||
groups: [],
|
||||
cache: [],
|
||||
},
|
||||
created() {
|
||||
@ -172,7 +178,8 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
function groupingData(data, filed){
|
||||
|
||||
function groupingData(data, filed) {
|
||||
let map = {};
|
||||
|
||||
let dest = [];
|
||||
@ -204,6 +211,7 @@
|
||||
return dest;
|
||||
|
||||
}
|
||||
|
||||
const wsProtocol = window.location.protocol == "https:" ? "wss" : "ws"
|
||||
const ws = new WebSocket(wsProtocol + '://' + window.location.host + '/ws');
|
||||
ws.onopen = function (evt) {
|
||||
@ -230,7 +238,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
statusCards.groups=groupingData(statusCards.servers,"Tag")
|
||||
statusCards.groups = groupingData(statusCards.servers, "Tag")
|
||||
}
|
||||
ws.onclose = function () {
|
||||
$.suiAlert({
|
||||
@ -242,7 +250,7 @@
|
||||
});
|
||||
}
|
||||
$('.ui.accordion')
|
||||
.accordion({"exclusive":false})
|
||||
.accordion({"exclusive": false})
|
||||
;
|
||||
</script>
|
||||
{{end}}
|
||||
|
Loading…
Reference in New Issue
Block a user