2021-01-15 11:45:49 -05:00
|
|
|
{{define "dashboard/monitor"}}
|
|
|
|
{{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="addOrEditMonitor()"><i
|
|
|
|
class="add icon"></i> 添加监控
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<table class="ui very basic table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>ID</th>
|
2021-01-29 22:22:59 -05:00
|
|
|
<th>名称</th>
|
2021-01-15 11:45:49 -05:00
|
|
|
<th>目标</th>
|
2021-01-16 02:36:00 -05:00
|
|
|
<th>类型</th>
|
2021-01-15 11:45:49 -05:00
|
|
|
<th>管理</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{range $monitor := .Monitors}}
|
|
|
|
<tr>
|
|
|
|
<td>{{$monitor.ID}}</td>
|
|
|
|
<td>{{$monitor.Name}}</td>
|
|
|
|
<td>{{$monitor.Target}}</td>
|
2021-01-16 02:36:00 -05:00
|
|
|
<td>
|
|
|
|
{{if eq $monitor.Type 1}}HTTP(S)/SSL证书
|
|
|
|
{{else if eq $monitor.Type 2}}
|
|
|
|
ICMP Ping
|
|
|
|
{{else}}
|
|
|
|
TCP 端口
|
|
|
|
{{end}}
|
|
|
|
</td>
|
2021-01-15 11:45:49 -05:00
|
|
|
<td>
|
|
|
|
<div class="ui mini icon buttons">
|
|
|
|
<button class="ui button" onclick="addOrEditMonitor({{$monitor}})">
|
|
|
|
<i class="edit icon"></i>
|
|
|
|
</button>
|
|
|
|
<button class="ui button"
|
|
|
|
onclick="showConfirm('删除监控','确认删除此监控?',deleteRequest,'/api/monitor/'+{{$monitor.ID}})">
|
2021-01-20 06:24:59 -05:00
|
|
|
<i class="trash alternate outline icon"></i>
|
2021-01-15 11:45:49 -05:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{template "component/monitor"}}
|
|
|
|
{{template "common/footer" .}}
|
|
|
|
{{end}}
|