-
Notifications
You must be signed in to change notification settings - Fork 0
/
status.html
36 lines (36 loc) · 1.52 KB
/
status.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Status Page</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100 flex flex-col min-h-screen justify-between">
<main class="px-4 py-8">
<h1 class="text-2xl font-bold mb-4 text-center">Status Page</h1>
{{range .services}}
<div class="bg-white shadow rounded-lg p-4 mb-4 flex justify-between items-center w-full relative">
<h2 class="text-xl font-bold mb-2">{{.Name}}</h2>
{{if eq .Status "up"}}
<div class="text-center text-green-500 mb-2 relative group">
<span>✓</span>
<div class="absolute left-0 transform -translate-x-full mt-2 w-16 p-2 bg-white border border-green-500 text-sm text-green-700 rounded shadow-lg hidden group-hover:block z-10">
<p>OK</p>
</div>
</div>
{{else}}
<div class="text-center text-red-500 mb-2 relative group">
<span>✗</span>
{{if .Error}}
<div class="absolute left-0 transform -translate-x-full mt-2 w-64 p-2 bg-white border border-red-500 text-sm text-red-700 rounded shadow-lg hidden group-hover:block z-10">
<p>Error: {{.Error}}</p>
</div>
{{end}}
</div>
{{end}}
</div>
{{end}}
</main>
</body>
</html>