zdravko/web/templates/pages/settings_home.tmpl

96 lines
3 KiB
Cheetah
Raw Normal View History

2024-02-29 11:15:15 +00:00
{{ define "settings" }}
<div class="pt-8 mx-auto max-w-screen-xl text-center lg:pt-16">
<h1
class="mb-4 text-2xl font-extrabold tracking-tight leading-none text-gray-900 md:text-3xl lg:text-4xl"
>
Hi there, {{ .User.Email }}.
2024-02-23 11:18:02 +00:00
</h1>
<p class="mb-8 text-l font-normal text-gray-500 lg:text-l sm:px-8 md:px-40">
2024-02-29 22:42:56 +00:00
Welcome to the settings page. Here you can manage your worker groups,
checks, and notifications.
2024-02-23 11:18:02 +00:00
</p>
</div>
2024-02-29 11:15:15 +00:00
<div class="mx-auto max-w-screen-xl flex flex-col sm:flex-row gap-4">
<div
2024-02-29 22:42:56 +00:00
class="inline-block bg-white rounded-lg shadow p-5 text-center sm:text-left"
2024-02-29 11:15:15 +00:00
>
<h3 class="text-sm leading-6 font-medium text-gray-400">Total Targets</h3>
<p class="text-3xl font-bold text-black">{{ .ChecksCount }}</p>
2024-02-29 11:15:15 +00:00
</div>
<div
2024-02-29 22:42:56 +00:00
class="inline-block bg-white rounded-lg shadow p-5 text-center sm:text-left"
2024-02-29 11:15:15 +00:00
>
<h3 class="text-sm leading-6 font-medium text-gray-400">Total Checks</h3>
<p class="text-3xl font-bold text-black">{{ .ChecksCount }}</p>
2024-02-29 11:15:15 +00:00
</div>
<div
class="inline-block bg-white rounded-lg shadow p-5 text-center sm:text-left"
>
<h3 class="text-sm leading-6 font-medium text-gray-400">
Total Worker Groups
</h3>
<p class="text-3xl font-bold text-black">{{ .WorkerGroupsCount }}</p>
</div>
2024-02-29 11:15:15 +00:00
<div
2024-02-29 22:42:56 +00:00
class="inline-block bg-white rounded-lg shadow p-5 text-center sm:text-left"
2024-02-29 11:15:15 +00:00
>
<h3 class="text-sm leading-6 font-medium text-gray-400">
Total Notifications
</h3>
2024-02-29 22:42:56 +00:00
<p class="text-3xl font-bold text-black">{{ .NotificationsCount }}</p>
2024-02-29 11:15:15 +00:00
</div>
</div>
2024-02-29 22:42:56 +00:00
<section class="mt-4">
<table>
<caption>
Execution History
<p>Last 10 executions for all checks and worker groups.</p>
2024-02-29 22:42:56 +00:00
</caption>
<thead>
<tr>
<th>Check</th>
2024-02-29 22:42:56 +00:00
<th>Worker Group</th>
<th>Status</th>
<th>Executed At</th>
<th>Note</th>
</tr>
</thead>
<tbody>
{{ range .History }}
<tr>
<th>
<a
class="underline hover:text-blue-600"
href="/settings/checks/{{ .CheckId }}"
>{{ .CheckId }}</a
2024-02-29 22:42:56 +00:00
>
</th>
<td>
<span
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800"
>
{ .WorkerGroupName }
2024-02-29 22:42:56 +00:00
</span>
</td>
<td>
<span
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full {{ if eq .Status "SUCCESS" }}
bg-green-100 text-green-800
{{ else }}
bg-red-100 text-red-800
{{ end }}"
>
{{ .Status }}
</span>
</td>
<td>{ .CreatedAt.Time.Format "2006-01-02 15:04:05" }</td>
<td class="whitespace-normal">{ .Note }</td>
2024-02-29 22:42:56 +00:00
</tr>
{{ end }}
</tbody>
</table>
</section>
2024-02-29 11:15:15 +00:00
{{ end }}