nezha/resource/template/dashboard-default/monitor.html

63 lines
2.2 KiB
HTML
Raw Normal View History

2022-06-02 21:45:11 -04:00
{{define "dashboard-default/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">
2021-08-05 23:48:34 -04:00
<button class="ui right labeled nezha-primary-btn icon button" onclick="addOrEditMonitor()">
<i class="add icon"></i> {{tr "AddMonitor"}}
</button>
</div>
</div>
<table class="ui very basic table">
<thead>
<tr>
<th>ID</th>
<th>{{tr "Name"}}</th>
<th>{{tr "Target"}}</th>
<th>{{tr "Coverage"}}</th>
<th>{{tr "SpecificServers"}}</th>
<th>{{tr "Type"}}</th>
<th>{{tr "Duration"}}</th>
<th>{{tr "NotificationMethodGroup"}}</th>
<th>{{tr "Notification"}}</th>
<th>{{tr "Administration"}}</th>
</tr>
</thead>
<tbody>
{{range $monitor := .Monitors}}
<tr>
<td>{{$monitor.ID}}</td>
<td>{{$monitor.Name}}</td>
<td>{{$monitor.Target}}</td>
<td>{{if eq $monitor.Cover 0}}{{tr "CoverAll"}}{{else}}{{tr "IgnoreAll"}}{{end}}</td>
<td>{{$monitor.SkipServersRaw}}</td>
<td>
{{if eq $monitor.Type 1}}{{tr "SSLCertificate"}} {{else if eq $monitor.Type
2}} ICMP Ping {{else}} {{tr "TCPPort"}} {{end}}
</td>
2022-04-29 14:06:25 -04:00
<td>{{$monitor.Duration}} {{tr "Seconds"}}</td>
<td>{{$monitor.NotificationTag}}</td>
<td>{{$monitor.Notify}}</td>
<td>
<div class="ui mini icon buttons">
<button class="ui button" onclick="addOrEditMonitor({{$monitor}})">
<i class="edit icon"></i>
</button>
<button class="ui button"
2022-04-28 23:45:41 -04:00
onclick="showConfirm('{{tr "DeleteService"}}','{{tr "ConfirmToDeleteThisService"}}',deleteRequest,'/api/monitor/'+{{$monitor.ID}})">
<i class="trash alternate outline icon"></i>
</button>
</div>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</div>
{{template "component/monitor"}} {{template "common/footer" .}}
<script>
$(".checkbox").checkbox();
</script>
{{end}}