2024-02-29 11:15:15 +00:00
|
|
|
{{ define "settings" }}
|
2024-05-14 19:38:45 +00:00
|
|
|
{{ $description := "Monitors are constantly determining if targets are healthy or not." }}
|
2024-02-12 13:20:38 +00:00
|
|
|
|
2024-03-01 09:53:36 +00:00
|
|
|
{{ $length := len .Monitors }}
|
|
|
|
{{ if eq $length 0 }}
|
2024-02-29 11:15:15 +00:00
|
|
|
<div class="py-8 px-4 mx-auto max-w-screen-xl text-center lg:py-16">
|
|
|
|
<h1
|
|
|
|
class="mb-4 text-2xl font-extrabold tracking-tight leading-none text-gray-900 md:text-3xl lg:text-4xl"
|
|
|
|
>
|
|
|
|
There are no monitors yet.
|
|
|
|
</h1>
|
|
|
|
<p
|
2024-05-14 19:38:45 +00:00
|
|
|
class="mb-8 text-l font-normal text-gray-700 lg:text-l sm:px-8 lg:px-40"
|
2024-02-29 11:15:15 +00:00
|
|
|
>
|
|
|
|
{{ $description }}
|
|
|
|
</p>
|
2024-05-14 19:38:45 +00:00
|
|
|
<div class="flex flex-col gap-4 sm:flex-row sm:justify-center">
|
2024-02-29 11:15:15 +00:00
|
|
|
<a
|
|
|
|
href="/settings/monitors/create"
|
|
|
|
class="inline-flex justify-center items-center py-3 px-5 text-base font-medium text-center text-white rounded-lg bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300"
|
|
|
|
>
|
2024-02-24 11:57:53 +00:00
|
|
|
Create First Monitor
|
2024-02-29 11:15:15 +00:00
|
|
|
<svg class="feather ml-1 h-5 w-5 overflow-visible">
|
|
|
|
<use href="/static/icons/feather-sprite.svg#plus" />
|
|
|
|
</svg>
|
2024-02-23 11:18:02 +00:00
|
|
|
</a>
|
2024-02-29 11:15:15 +00:00
|
|
|
</div>
|
2024-02-15 17:43:35 +00:00
|
|
|
</div>
|
2024-02-29 11:15:15 +00:00
|
|
|
{{ else }}
|
|
|
|
<section>
|
|
|
|
<table>
|
2024-02-27 22:47:20 +00:00
|
|
|
<caption>
|
2024-02-24 11:57:53 +00:00
|
|
|
List of Monitors
|
2024-02-29 14:12:20 +00:00
|
|
|
<div class="mt-1 gap-4 grid grid-cols-1 md:grid-cols-[1fr,20%]">
|
2024-02-27 22:47:20 +00:00
|
|
|
<p>
|
2024-02-18 21:37:17 +00:00
|
|
|
{{ $description }}
|
2024-02-15 22:47:56 +00:00
|
|
|
</p>
|
2024-02-29 11:15:15 +00:00
|
|
|
<a
|
|
|
|
href="/settings/monitors/create"
|
2024-02-29 14:12:20 +00:00
|
|
|
class="h-min inline-flex justify-center items-center py-2 px-4 text-sm font-medium text-center text-white rounded-lg bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300"
|
2024-02-29 11:15:15 +00:00
|
|
|
>
|
2024-02-15 22:47:56 +00:00
|
|
|
Create New
|
2024-02-29 11:15:15 +00:00
|
|
|
<svg class="feather h-5 w-5 overflow-visible">
|
|
|
|
<use href="/static/icons/feather-sprite.svg#plus" />
|
|
|
|
</svg>
|
2024-02-15 22:47:56 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
2024-02-15 17:43:35 +00:00
|
|
|
</caption>
|
|
|
|
<thead class="text-xs text-gray-700 uppercase bg-gray-50">
|
2024-02-29 11:15:15 +00:00
|
|
|
<tr>
|
2024-03-04 13:20:01 +00:00
|
|
|
<th scope="col">Monitor Group</th>
|
2024-02-29 11:15:15 +00:00
|
|
|
<th scope="col">Name</th>
|
2024-05-14 19:38:45 +00:00
|
|
|
<th scope="col">Visibility</th>
|
2024-02-29 11:15:15 +00:00
|
|
|
<th scope="col">Worker Groups</th>
|
|
|
|
<th scope="col">Status</th>
|
|
|
|
<th scope="col">Schedule</th>
|
|
|
|
<th scope="col">Action</th>
|
|
|
|
</tr>
|
2024-02-15 17:43:35 +00:00
|
|
|
</thead>
|
2024-03-03 14:28:25 +00:00
|
|
|
<tbody>
|
|
|
|
{{ range .MonitorGroups }}
|
|
|
|
{{ $currentGroup := . }}
|
|
|
|
<tr class="row-special">
|
2024-02-29 11:15:15 +00:00
|
|
|
<th scope="row">
|
2024-03-03 14:28:25 +00:00
|
|
|
{{ . }}
|
2024-02-29 11:15:15 +00:00
|
|
|
</th>
|
2024-03-03 14:28:25 +00:00
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
2024-05-14 19:38:45 +00:00
|
|
|
<td></td>
|
2024-02-15 17:43:35 +00:00
|
|
|
</tr>
|
2024-03-03 14:28:25 +00:00
|
|
|
{{ range $group, $monitors := $.Monitors }}
|
|
|
|
{{ if eq $group $currentGroup }}
|
|
|
|
{{ range $monitors }}
|
|
|
|
<tr>
|
2024-03-04 08:36:12 +00:00
|
|
|
<th scope="row">└─</th>
|
2024-03-03 14:28:25 +00:00
|
|
|
<th scope="row">
|
|
|
|
{{ .Name }}
|
|
|
|
</th>
|
2024-05-14 19:38:45 +00:00
|
|
|
<td>
|
|
|
|
<span
|
|
|
|
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800"
|
|
|
|
>
|
|
|
|
Public
|
|
|
|
</span>
|
|
|
|
<span
|
|
|
|
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-fuchsia-100 text-fuchsia-800"
|
|
|
|
>
|
|
|
|
Private
|
|
|
|
</span>
|
|
|
|
</td>
|
2024-03-03 14:28:25 +00:00
|
|
|
<td>
|
|
|
|
{{ range .WorkerGroups }}
|
|
|
|
<span
|
|
|
|
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800"
|
|
|
|
>
|
|
|
|
{{ . }}
|
|
|
|
</span>
|
|
|
|
{{ end }}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ if eq .Status "ACTIVE" }}
|
|
|
|
<span
|
|
|
|
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800"
|
|
|
|
>
|
|
|
|
ACTIVE
|
|
|
|
</span>
|
|
|
|
{{ else if eq .Status "PAUSED" }}
|
|
|
|
<span
|
|
|
|
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800"
|
|
|
|
>
|
|
|
|
PAUSED
|
|
|
|
</span>
|
|
|
|
{{ else }}
|
|
|
|
<span
|
|
|
|
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800"
|
|
|
|
>
|
|
|
|
UNKNOWN
|
|
|
|
</span>
|
|
|
|
{{ end }}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ .Schedule }}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a href="/settings/monitors/{{ .Id }}" class="link"
|
|
|
|
>Details</a
|
|
|
|
>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</tbody>
|
2024-02-29 11:15:15 +00:00
|
|
|
</table>
|
|
|
|
</section>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|