From 10e4d53aa9da901e3aa4d435a5cc9af62a731378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E8=8B=A5=E4=B8=BA=E7=8E=8B?= <807190135@qq.com> Date: Tue, 12 Jan 2021 18:00:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=8A=B6=E6=80=81=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E4=B8=8A=E4=B8=8B=E7=A9=BA=E7=99=BD=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/template/theme-default/home.html | 174 +++++++++++----------- 1 file changed, 91 insertions(+), 83 deletions(-) diff --git a/resource/template/theme-default/home.html b/resource/template/theme-default/home.html index 3a11400..f39523b 100644 --- a/resource/template/theme-default/home.html +++ b/resource/template/theme-default/home.html @@ -10,89 +10,95 @@
@#(group.Tag!==''?group.Tag:'默认')#@
-
-
-
@#server.Name + - (server.live?'':' [已离线]')#@ - - +
@@ -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}) ; {{end}}