feat: 后台服务器备注 close #72

This commit is contained in:
naiba
2021-01-20 19:24:59 +08:00
parent 29bc810a8f
commit ec17948fe4
12 changed files with 83 additions and 66 deletions

View File

@@ -9,8 +9,8 @@
<input type="text" name="name" placeholder="爱因斯坦-光速1号">
</div>
<div class="field">
<label>标签</label>
<input type="text" name="Tag" placeholder="服务器标签">
<label>分组</label>
<input type="text" name="Tag" placeholder="服务器分组">
</div>
<div class="field">
<label>展示权重</label>
@@ -20,6 +20,10 @@
<label>密钥</label>
<input type="text" name="secret">
</div>
<div class="field">
<label>隐藏备注</label>
<textarea name="Note"></textarea>
</div>
</form>
</div>
<div class=" actions">

View File

@@ -41,7 +41,7 @@
</button>
<button class="ui button"
onclick="showConfirm('删除监控','确认删除此监控?',deleteRequest,'/api/monitor/'+{{$monitor.ID}})">
<i class="delete icon"></i>
<i class="trash alternate outline icon"></i>
</button>
</div>
</td>

View File

@@ -34,7 +34,7 @@
</button>
<button class="ui button"
onclick="showConfirm('删除通知方式','确认删除此通知方式?',deleteRequest,'/api/notification/'+{{$notification.ID}})">
<i class="delete icon"></i>
<i class="trash alternate outline icon"></i>
</button>
</div>
</td>
@@ -74,7 +74,7 @@
</button>
<button class="ui button"
onclick="showConfirm('删除通知方式','确认删除此通知方式?',deleteRequest,'/api/alert-rule/'+{{$rule.ID}})">
<i class="delete icon"></i>
<i class="trash alternate outline icon"></i>
</button>
</div>
</td>

View File

@@ -15,10 +15,11 @@
<tr>
<th>权重</th>
<th>备注</th>
<th>标签</th>
<th>分组</th>
<th>IP</th>
<th>ID</th>
<th>密钥</th>
<th>隐藏备注</th>
<th>管理</th>
</tr>
</thead>
@@ -31,6 +32,7 @@
<td>{{$server.Host.IP}}</td>
<td>{{$server.ID}}</td>
<td>{{$server.Secret}}</td>
<td style="word-break: break-word;">{{$server.Note}}</td>
<td>
<div class="ui mini icon buttons">
<button class="ui button" onclick="addOrEditServer({{$server.Marshal}})">
@@ -38,7 +40,7 @@
</button>
<button class="ui button"
onclick="showConfirm('删除节点','确认删除此监控节点?',deleteRequest,'/api/server/'+{{$server.ID}})">
<i class="delete icon"></i>
<i class="trash alternate outline icon"></i>
</button>
</div>
</td>

View File

@@ -26,7 +26,7 @@
</td>
<td class="ui center aligned">{{range $i,$d := $service.Delay}}
<div class="ui icon button {{className (div (index $service.Up $i) (add (index $service.Up $i) (index $service.Down $i)))}}"
data-tooltip="{{dayBefore $i}},平均延迟:{{float32f $d}}ms">
data-tooltip="{{dayBefore $i}}在线率:{{float32f (div (index $service.Up $i) (add (index $service.Up $i) (index $service.Down $i)))}}%平均延迟:{{float32f $d}}ms">
</div> {{end}}
</td>
<td class="ui center aligned delay-today">