nezha/resource/template/dashboard/server.html
2021-01-08 21:04:50 +08:00

49 lines
1.8 KiB
HTML

{{define "dashboard/server"}}
{{template "common/header" .}}
{{template "common/menu" .}}
<div class="nb-container">
<div class="ui container">
<div class="ui grid">
<div class="right floated right aligned twelve wide column">
<button class="ui right labeled positive icon button" onclick="addOrEditServer()"><i
class="add icon"></i> 添加服务器
</button>
</div>
</div>
<table class="ui very basic table">
<thead>
<tr>
<th>权重</th>
<th>备注</th>
<th>IP</th>
<th>密钥</th>
<th>管理</th>
</tr>
</thead>
<tbody>
{{range $server := .Servers}}
<tr>
<td>{{$server.DisplayIndex}}</td>
<td>{{$server.Name}}</td>
<td>{{$server.Host.IP}}</td>
<td>{{$server.Secret}}</td>
<td>
<div class="ui mini icon buttons">
<button class="ui button" onclick="addOrEditServer({{$server.Marshal}})">
<i class="edit icon"></i>
</button>
<button class="ui button"
onclick="showConfirm('删除节点','确认删除此监控节点?',deleteRequest,'/api/server/'+{{$server.ID}})">
<i class="delete icon"></i>
</button>
</div>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</div>
{{template "component/server"}}
{{template "common/footer" .}}
{{end}}