mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-23 13:18:13 -05:00
0e9dfc0c7e
modified: resource/template/common/menu.html modified: resource/template/component/confirm.html modified: resource/template/component/cron.html modified: resource/template/component/monitor.html modified: resource/template/component/notification.html modified: resource/template/component/rule.html modified: resource/template/component/server.html modified: resource/template/dashboard/cron.html modified: resource/template/dashboard/error.html modified: resource/template/dashboard/login.html modified: resource/template/dashboard/monitor.html modified: resource/template/dashboard/notification.html modified: resource/template/dashboard/server.html modified: resource/template/dashboard/setting.html modified: resource/template/dashboard/terminal.html
63 lines
2.2 KiB
HTML
63 lines
2.2 KiB
HTML
{{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 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 "NotificationMethod"}}</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>
|
|
<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"
|
|
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}} |