2024-02-29 11:15:15 +00:00
|
|
|
{{ define "main" }}
|
2024-05-28 17:59:44 +00:00
|
|
|
<div
|
|
|
|
id="page-index"
|
|
|
|
class="container max-w-screen-md flex flex-col mt-20 gap-20"
|
|
|
|
>
|
2024-05-23 16:33:30 +00:00
|
|
|
{{ $length := len .Targets }}
|
2024-03-03 14:28:25 +00:00
|
|
|
{{ if eq $length 0 }}
|
2024-02-29 11:15:15 +00:00
|
|
|
<section>
|
|
|
|
<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"
|
|
|
|
>
|
2024-05-23 16:33:30 +00:00
|
|
|
There are no targets yet.
|
2024-02-22 16:29:17 +00:00
|
|
|
</h1>
|
2024-02-29 11:15:15 +00:00
|
|
|
<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
|
|
|
>
|
2024-05-23 16:33:30 +00:00
|
|
|
Create a target to target your services and get notified when they
|
|
|
|
are down.
|
2024-02-22 16:29:17 +00:00
|
|
|
</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
|
2024-05-23 16:33:30 +00:00
|
|
|
href="/settings/targets/create"
|
2024-02-29 11:15:15 +00:00
|
|
|
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-05-23 16:33:30 +00:00
|
|
|
Create First Target
|
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>
|
|
|
|
</a>
|
2024-02-22 16:29:17 +00:00
|
|
|
</div>
|
2024-02-29 11:15:15 +00:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{{ else }}
|
2024-05-28 17:59:44 +00:00
|
|
|
{{ if or (eq .Outcome "UNKNOWN") (eq .Outcome "HEALTHY") }}
|
2024-02-29 11:15:15 +00:00
|
|
|
<div class="flex flex-col items-center">
|
|
|
|
<svg
|
|
|
|
class="feather h-20 w-20 rounded-full bg-green-300 p-4 overflow-visible"
|
|
|
|
>
|
|
|
|
<use href="/static/icons/feather-sprite.svg#check" />
|
|
|
|
</svg>
|
2024-05-14 19:38:45 +00:00
|
|
|
<h1 class="text-gray-700 mt-4">All services are online</h1>
|
|
|
|
<p class="text-gray-700 text-sm">
|
2024-02-29 14:12:20 +00:00
|
|
|
Last updated on
|
|
|
|
{{ Now.UTC.Format "Jan 02 at 15:04 MST" }}
|
2024-02-29 11:15:15 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
2024-05-28 17:59:44 +00:00
|
|
|
{{ else if eq .Outcome "DOWN" }}
|
2024-02-29 11:15:15 +00:00
|
|
|
<div class="flex flex-col items-center">
|
|
|
|
<svg
|
|
|
|
class="feather h-20 w-20 rounded-full bg-red-300 p-4 overflow-visible"
|
|
|
|
>
|
|
|
|
<use href="/static/icons/feather-sprite.svg#alert-triangle" />
|
2024-05-15 15:25:39 +00:00
|
|
|
</svg>
|
2024-05-28 17:59:44 +00:00
|
|
|
<h1 class="text-gray-700 mt-4">Some services are down</h1>
|
2024-05-15 15:25:39 +00:00
|
|
|
<p class="text-gray-700 text-sm">
|
|
|
|
Last updated on
|
|
|
|
{{ Now.UTC.Format "Jan 02 at 15:04 MST" }}
|
|
|
|
</p>
|
|
|
|
</div>
|
2024-05-28 17:59:44 +00:00
|
|
|
{{ else if eq .Outcome "DEGRADED" }}
|
2024-05-15 15:25:39 +00:00
|
|
|
<div class="flex flex-col items-center">
|
|
|
|
<svg
|
|
|
|
class="feather h-20 w-20 rounded-full bg-orange-300 p-4 overflow-visible"
|
|
|
|
>
|
|
|
|
<use href="/static/icons/feather-sprite.svg#alert-triangle" />
|
2024-02-29 11:15:15 +00:00
|
|
|
</svg>
|
2024-05-28 17:59:44 +00:00
|
|
|
<h1 class="text-gray-700 mt-4">Degraded services</h1>
|
2024-05-14 19:38:45 +00:00
|
|
|
<p class="text-gray-700 text-sm">
|
2024-02-29 14:12:20 +00:00
|
|
|
Last updated on
|
|
|
|
{{ Now.UTC.Format "Jan 02 at 15:04 MST" }}
|
2024-02-29 11:15:15 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
2024-02-22 16:29:17 +00:00
|
|
|
{{ end }}
|
2024-05-23 16:33:30 +00:00
|
|
|
<div class="targets flex flex-col gap-4">
|
2024-03-04 13:20:01 +00:00
|
|
|
<div
|
|
|
|
class="inline-flex gap-1 justify-center md:justify-end time-range"
|
|
|
|
role="group"
|
|
|
|
>
|
|
|
|
<a
|
|
|
|
href="/?time-range=90days"
|
|
|
|
class="{{ if eq .TimeRange "90days" }}active{{ end }}"
|
|
|
|
type="button"
|
|
|
|
>90 Days</a
|
2024-03-03 14:28:25 +00:00
|
|
|
>
|
2024-03-04 13:20:01 +00:00
|
|
|
<a
|
|
|
|
href="/?time-range=48hours"
|
|
|
|
class="{{ if eq .TimeRange "48hours" }}active{{ end }}"
|
|
|
|
type="button"
|
|
|
|
>48 Hours</a
|
|
|
|
>
|
|
|
|
<a
|
|
|
|
href="/?time-range=90minutes"
|
|
|
|
class="{{ if eq .TimeRange "90minutes" }}active{{ end }}"
|
|
|
|
type="button"
|
|
|
|
>90 Minutes</a
|
2024-02-29 11:15:15 +00:00
|
|
|
>
|
|
|
|
</div>
|
2024-05-23 16:33:30 +00:00
|
|
|
{{ range $group, $targetsAndStatus := .Targets }}
|
2024-05-14 19:38:45 +00:00
|
|
|
<details
|
|
|
|
open
|
2024-04-28 12:42:43 +00:00
|
|
|
class="bg-white shadow-md rounded-lg p-6 py-4 gap-2 [&_svg]:open:rotate-90"
|
2024-03-04 13:20:01 +00:00
|
|
|
>
|
|
|
|
<summary
|
|
|
|
class="flex flex-row gap-2 p-3 py-2 -mx-3 cursor-pointer hover:bg-blue-50 rounded-lg"
|
|
|
|
>
|
2024-05-27 18:44:40 +00:00
|
|
|
<span
|
|
|
|
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full
|
2024-05-28 17:59:44 +00:00
|
|
|
{{ if eq $targetsAndStatus.Outcome "HEALTHY" }}
|
2024-05-27 18:44:40 +00:00
|
|
|
bg-green-100 text-green-800
|
2024-05-28 17:59:44 +00:00
|
|
|
{{ else if eq $targetsAndStatus.Outcome "DOWN" }}
|
2024-05-27 18:44:40 +00:00
|
|
|
bg-red-100 text-red-800
|
2024-05-28 17:59:44 +00:00
|
|
|
{{ else if eq $targetsAndStatus.Outcome "DEGRADED" }}
|
|
|
|
bg-orange-100 text-orange-800
|
2024-05-27 18:44:40 +00:00
|
|
|
{{ else }}
|
|
|
|
bg-gray-100 text-gray-800
|
|
|
|
{{ end }}"
|
2024-05-28 17:59:44 +00:00
|
|
|
>{{ .Outcome }}</span
|
2024-05-27 18:44:40 +00:00
|
|
|
>
|
2024-03-04 13:20:01 +00:00
|
|
|
<h2 class="flex-1 font-semibold capitalize">
|
|
|
|
{{ $group }}
|
|
|
|
</h2>
|
|
|
|
<svg
|
|
|
|
class="feather h-6 w-6 overflow-visible self-center transition-all duration-300"
|
|
|
|
>
|
2024-04-28 12:42:43 +00:00
|
|
|
<use href="/static/icons/feather-sprite.svg#chevron-right" />
|
2024-03-03 14:28:25 +00:00
|
|
|
</svg>
|
2024-03-04 13:20:01 +00:00
|
|
|
</summary>
|
2024-05-23 16:33:30 +00:00
|
|
|
{{ range $targetsAndStatus.Targets }}
|
2024-03-04 13:20:01 +00:00
|
|
|
<div
|
|
|
|
class="grid grid-cols-1 sm:grid-cols-2 gap-2 mt-2 pb-2 border-b last-of-type:pb-0 last-of-type:border-0 border-gray-100"
|
|
|
|
>
|
2024-03-03 14:28:25 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2024-05-27 18:44:40 +00:00
|
|
|
<span
|
|
|
|
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full
|
2024-05-28 17:59:44 +00:00
|
|
|
{{ if eq .Outcome "HEALTHY" }}
|
2024-05-27 18:44:40 +00:00
|
|
|
bg-green-100 text-green-800
|
2024-05-28 17:59:44 +00:00
|
|
|
{{ else if eq .Outcome "DOWN" }}
|
2024-05-27 18:44:40 +00:00
|
|
|
bg-red-100 text-red-800
|
2024-05-28 17:59:44 +00:00
|
|
|
{{ else if eq .Outcome "DEGRADED" }}
|
|
|
|
bg-orange-100 text-orange-800
|
2024-05-27 18:44:40 +00:00
|
|
|
{{ else }}
|
|
|
|
bg-gray-100 text-gray-800
|
|
|
|
{{ end }}"
|
2024-05-28 17:59:44 +00:00
|
|
|
>{{ .Outcome }}</span
|
2024-05-27 18:44:40 +00:00
|
|
|
>
|
2024-05-18 20:18:28 +00:00
|
|
|
<h4>
|
|
|
|
{{ .Name }}
|
|
|
|
{{ if eq .Visibility "PUBLIC" }}
|
|
|
|
<span
|
|
|
|
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800"
|
|
|
|
>
|
|
|
|
Public
|
|
|
|
</span>
|
|
|
|
{{ else if eq .Visibility "PRIVATE" }}
|
|
|
|
<span
|
|
|
|
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-fuchsia-100 text-fuchsia-800"
|
|
|
|
>
|
|
|
|
Private
|
|
|
|
</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 }}
|
|
|
|
</h4>
|
2024-03-03 14:28:25 +00:00
|
|
|
</div>
|
|
|
|
<div class="justify-self-end text-sm">
|
2024-05-27 18:44:40 +00:00
|
|
|
{{ printf "%.2f" .Uptime }}% uptime
|
2024-03-03 14:28:25 +00:00
|
|
|
</div>
|
2024-05-28 17:59:44 +00:00
|
|
|
|
2024-03-03 14:28:25 +00:00
|
|
|
<div
|
|
|
|
class="grid gap-px col-span-2 grid-flow-col h-8 rounded overflow-hidden"
|
|
|
|
>
|
2024-05-27 18:44:40 +00:00
|
|
|
{{ range .History }}
|
2024-03-04 13:20:01 +00:00
|
|
|
<div
|
2024-05-28 17:59:44 +00:00
|
|
|
class="has-tooltip [&_.tooltip]:hover:flex [&_.tooltip]:hover:visible flex
|
|
|
|
{{ if eq .Outcome "HEALTHY" }}
|
|
|
|
history healthy
|
|
|
|
{{ else if eq .Outcome "DOWN" }}
|
|
|
|
history down
|
|
|
|
{{ else if eq .Outcome "DEGRADED" }}
|
|
|
|
history degraded
|
2024-03-04 13:20:01 +00:00
|
|
|
{{ else }}
|
2024-05-28 17:59:44 +00:00
|
|
|
history unknown
|
|
|
|
{{ end }}"
|
|
|
|
>
|
|
|
|
<div class="flex-auto bar"></div>
|
2024-03-03 14:28:25 +00:00
|
|
|
<div
|
2024-05-27 18:44:40 +00:00
|
|
|
class="tooltip flex flex-col gap-2 bg-white border border-gray-200 rounded p-2 shadow-lg hidden z-50 absolute mt-10 -ml-4 flex-row text-xs"
|
2024-03-04 13:20:01 +00:00
|
|
|
>
|
2024-05-28 17:59:44 +00:00
|
|
|
<div class="flex flex-row gap-2 justify-between">
|
2024-05-27 18:44:40 +00:00
|
|
|
{{ if eq $.TimeRange "90days" }}
|
|
|
|
{{ .Date.Format "Jan 02" }}
|
|
|
|
{{ else if eq $.TimeRange "48hours" }}
|
|
|
|
{{ .Date.Format "Jan 02, 15:00 MST" }}
|
|
|
|
{{ else if eq $.TimeRange "90minutes" }}
|
|
|
|
{{ .Date.Format "Jan 02, 15:04 MST" }}
|
|
|
|
{{ end }}
|
2024-03-04 13:20:01 +00:00
|
|
|
<span
|
2024-05-27 18:44:40 +00:00
|
|
|
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full
|
2024-05-28 17:59:44 +00:00
|
|
|
{{ if eq .Outcome "HEALTHY" }}
|
2024-05-27 18:44:40 +00:00
|
|
|
bg-green-100 text-green-800
|
2024-05-28 17:59:44 +00:00
|
|
|
{{ else if eq .Outcome "DOWN" }}
|
2024-05-27 18:44:40 +00:00
|
|
|
bg-red-100 text-red-800
|
2024-05-28 17:59:44 +00:00
|
|
|
{{ else if eq .Outcome "DEGRADED" }}
|
|
|
|
bg-orange-100 text-orange-800
|
2024-05-27 18:44:40 +00:00
|
|
|
{{ else }}
|
|
|
|
bg-gray-100 text-gray-800
|
|
|
|
{{ end }}"
|
2024-05-28 17:59:44 +00:00
|
|
|
>{{ .Outcome }}
|
2024-05-27 18:44:40 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
2024-03-04 13:20:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-03-03 14:28:25 +00:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
2024-05-28 17:59:44 +00:00
|
|
|
|
2024-03-04 08:36:12 +00:00
|
|
|
<div
|
|
|
|
class="text-slate-500 justify-self-start text-xs tracking-wider"
|
|
|
|
>
|
2024-03-03 14:28:25 +00:00
|
|
|
{{ if eq $.TimeRange "90days" }}
|
|
|
|
90 days ago
|
|
|
|
{{ else if eq $.TimeRange "48hours" }}
|
|
|
|
48 hours ago
|
|
|
|
{{ else if eq $.TimeRange "90minutes" }}
|
|
|
|
90 minutes ago
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
2024-03-04 08:36:12 +00:00
|
|
|
<div
|
|
|
|
class="text-slate-500 justify-self-end text-xs tracking-wider"
|
|
|
|
>
|
|
|
|
Now
|
|
|
|
</div>
|
2024-03-03 14:28:25 +00:00
|
|
|
</div>
|
|
|
|
{{ end }}
|
2024-03-04 13:20:01 +00:00
|
|
|
</details>
|
2024-02-29 11:15:15 +00:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
2024-02-12 13:20:38 +00:00
|
|
|
{{ end }}
|
2024-02-10 11:59:58 +00:00
|
|
|
</div>
|
2024-02-29 11:15:15 +00:00
|
|
|
{{ end }}
|