优化忽略规则配置和 Agent 获取 IP

This commit is contained in:
naiba
2021-06-21 21:30:42 +08:00
parent c4f36d17d5
commit 4b0c0ad288
20 changed files with 370 additions and 291 deletions

View File

@@ -18,7 +18,8 @@
<th>计划</th>
<th>命令</th>
<th>成功推送</th>
<th>执行者</th>
<th>覆盖范围</th>
<th>排除服务器</th>
<th>最后执行</th>
<th>最后结果</th>
<th>管理</th>
@@ -32,6 +33,7 @@
<td>{{$cron.Scheduler}}</td>
<td>{{$cron.Command}}</td>
<td>{{$cron.PushSuccessful}}</td>
<td>{{if eq $cron.Cover 0}}忽略所有{{else}}覆盖所有{{end}}</td>
<td>{{$cron.ServersRaw}}</td>
<td>{{$cron.LastExecutedAt|tf}}</td>
<td>{{$cron.LastResult}}</td>

View File

@@ -4,10 +4,7 @@
<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()"
>
<button class="ui right labeled positive icon button" onclick="addOrEditMonitor()">
<i class="add icon"></i> 添加监控
</button>
</div>
@@ -18,7 +15,8 @@
<th>ID</th>
<th>名称</th>
<th>目标</th>
<th>跳过的服务器</th>
<th>覆盖范围</th>
<th>排除服务器</th>
<th>类型</th>
<th>通知</th>
<th>管理</th>
@@ -30,6 +28,7 @@
<td>{{$monitor.ID}}</td>
<td>{{$monitor.Name}}</td>
<td>{{$monitor.Target}}</td>
<td>{{if eq $monitor.Cover 0}}覆盖所有{{else}}忽略所有{{end}}</td>
<td>{{$monitor.SkipServersRaw}}</td>
<td>
{{if eq $monitor.Type 1}}HTTP(S)/SSL证书 {{else if eq $monitor.Type
@@ -38,16 +37,11 @@
<td>{{$monitor.Notify}}</td>
<td>
<div class="ui mini icon buttons">
<button
class="ui button"
onclick="addOrEditMonitor({{$monitor}})"
>
<button class="ui button" onclick="addOrEditMonitor({{$monitor}})">
<i class="edit icon"></i>
</button>
<button
class="ui button"
onclick="showConfirm('删除监控','确认删除此监控?',deleteRequest,'/api/monitor/'+{{$monitor.ID}})"
>
<button class="ui button"
onclick="showConfirm('删除监控','确认删除此监控?',deleteRequest,'/api/monitor/'+{{$monitor.ID}})">
<i class="trash alternate outline icon"></i>
</button>
</div>
@@ -62,4 +56,4 @@
<script>
$(".checkbox").checkbox();
</script>
{{end}}
{{end}}

View File

@@ -17,6 +17,7 @@
<th>名称</th>
<th>分组</th>
<th>IP</th>
<th>版本号</th>
<th>密钥</th>
<th>备注</th>
<th>管理</th>
@@ -29,6 +30,7 @@
<td>{{$server.Name}}</td>
<td>{{$server.Tag}}</td>
<td>{{$server.Host.IP}}</td>
<td>{{$server.Host.Version}}</td>
<td>{{$server.Secret}}</td>
<td style="word-break: break-word;">{{$server.Note}}</td>
<td>