💄 chore: 服务监控相关的前端优化

This commit is contained in:
naiba 2021-01-16 15:36:00 +08:00
parent d896a01883
commit 161102a37b
2 changed files with 17 additions and 3 deletions

View File

@ -10,7 +10,7 @@
</div>
<div class="field">
<label>目标</label>
<input type="text" name="Target" placeholder="https://t.tt,t.tt,t.tt:80">
<input type="text" name="Target" placeholder="HTTP(https://t.tt)Ping(t.tt)TCP(t.tt:80)">
</div>
<div class="field">
<label>类型</label>
@ -21,6 +21,13 @@
</select>
</div>
</form>
<div class="ui warning message">
<p>
类型为 <b>HTTP-GET</b> 时输入URL(带 http/https, HTTPS 协议的会顺带监控SSL证书)<br>
类型为 <b>ICMP-Ping</b> 时输入主机名/IP不带端口<br>
类型为 <b>TCP-Ping</b> 时输入主机名/IP + 端口号example.com:22
</p>
</div>
</div>
<div class=" actions">
<div class="ui negative button">取消</div>

View File

@ -15,8 +15,8 @@
<tr>
<th>ID</th>
<th>备注</th>
<th>类型</th>
<th>目标</th>
<th>类型</th>
<th>管理</th>
</tr>
</thead>
@ -26,7 +26,14 @@
<td>{{$monitor.ID}}</td>
<td>{{$monitor.Name}}</td>
<td>{{$monitor.Target}}</td>
<td>{{$monitor.Type}}</td>
<td>
{{if eq $monitor.Type 1}}HTTP(S)/SSL证书
{{else if eq $monitor.Type 2}}
ICMP Ping
{{else}}
TCP 端口
{{end}}
</td>
<td>
<div class="ui mini icon buttons">
<button class="ui button" onclick="addOrEditMonitor({{$monitor}})">