mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
✨ feat: 展示排序 close #29
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.1/dist/semantic.min.js"></script>
|
||||
<script src="/static/semantic-ui-alerts.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script>
|
||||
<script src="/static/main.js?v202012211616"></script>
|
||||
<script src="/static/main.js?v202101082103"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
<label>备注</label>
|
||||
<input type="text" name="name" placeholder="爱因斯坦-光速1号">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>展示权重</label>
|
||||
<input type="number" name="DisplayIndex" placeholder="越大越靠前">
|
||||
</div>
|
||||
<div class="secret field">
|
||||
<label>密钥</label>
|
||||
<input type="text" name="secret">
|
||||
|
||||
@@ -13,20 +13,20 @@
|
||||
<table class="ui very basic table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>权重</th>
|
||||
<th>备注</th>
|
||||
<th>IP</th>
|
||||
<th>密钥</th>
|
||||
<th>最后活跃</th>
|
||||
<th>管理</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range $server := .Servers}}
|
||||
<tr>
|
||||
<td>{{$server.ID}}</td>
|
||||
<td>{{$server.DisplayIndex}}</td>
|
||||
<td>{{$server.Name}}</td>
|
||||
<td>{{$server.Host.IP}}</td>
|
||||
<td>{{$server.Secret}}</td>
|
||||
<td>{{$server.LastActive}}</td>
|
||||
<td>
|
||||
<div class="ui mini icon buttons">
|
||||
<button class="ui button" onclick="addOrEditServer({{$server.Marshal}})">
|
||||
|
||||
@@ -172,9 +172,8 @@
|
||||
ws.onmessage = function (evt) {
|
||||
const oldServers = statusCards.servers
|
||||
statusCards.servers = JSON.parse(evt.data)
|
||||
const keys = Object.keys(statusCards.servers)
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
const ns = statusCards.servers[keys[i]];
|
||||
for (let i = 0; i < statusCards.servers.length; i++) {
|
||||
const ns = statusCards.servers[i];
|
||||
if (!ns.Host) ns.live = false
|
||||
else {
|
||||
const lastActive = new Date(ns.LastActive).getTime()
|
||||
|
||||
@@ -238,9 +238,8 @@
|
||||
}
|
||||
ws.onmessage = function (evt) {
|
||||
statusCards.servers = JSON.parse(evt.data)
|
||||
const keys = Object.keys(statusCards.servers)
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
const ns = statusCards.servers[keys[i]];
|
||||
for (let i = 0; i < statusCards.servers.length; i++) {
|
||||
const ns = statusCards.servers[i];
|
||||
if (!ns.Host) ns.live = false
|
||||
else {
|
||||
const lastActive = new Date(ns.LastActive).getTime()
|
||||
|
||||
Reference in New Issue
Block a user