-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-en.html
103 lines (97 loc) · 3.72 KB
/
template-en.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>{{ title }}</title>
<meta http-equiv="refresh" content="{{ refresh_interval }}">
<style type="text/css">
body {
font-family: Helvetica;
font-size: 25px;
}
</style>
</head>
<body>
<h1>{{ title }}</h1>
<p>Effective: {{ time }}</p>
<h3>Current Status</h3>
<table>
{% for host in status %}
<tr>
<th style="padding: 7px; border-radius: 9px; background: {% if host.status %}#00FF00{% else %}red{% endif %};">{% if host.status %}OK{% else %}CRITICAL{% endif %}</th>
<td style="padding-left: 20px;">{{ host.host }}</td>
</tr>
{% endfor %}
</table>
<h3>Average availability</h3>
<p>Since {{ stats_first }}</p>
<table style="width: 100%;">
<tr>
<th style="text-align: left;">Service</th>
<th>12h</th>
<th>1d</th>
<th>1w</th>
<th>30d</th>
<th>90d</th>
<th>365d</th>
</tr>
{% for host in status %}
<tr>
<th style="text-align: left;">{{ host.host }}</th>
<td style="text-align: center;">{{ '{:.2f}'.format(host.stats.hd) }}%</td>
<td style="text-align: center;">{{ '{:.2f}'.format(host.stats.d) }}%</td>
<td style="text-align: center;">{{ '{:.2f}'.format(host.stats.w) }}%</td>
<td style="text-align: center;">{{ '{:.2f}'.format(host.stats.m) }}%</td>
<td style="text-align: center;">{{ '{:.2f}'.format(host.stats.mm) }}%</td>
<td style="text-align: center;">{{ '{:.2f}'.format(host.stats.y) }}%</td>
</tr>
{% endfor %}
</table>
{% if display_downtimes %}
<h3>Previous Downtimes</h3>
<table style="width: 100%; border-collapse: collapse;">
<tr>
<th></th>
<th>Start</th>
<th>End</th>
<th>Reason</th>
</tr>
{% for host in downtimes %}
<tr style="border-left: 1px solid black; border-top: 1px solid black; border-right: 1px solid black;{% if host.downtimes|length == 1%}border-bottom: 1px solid black;{% endif %}">
<th rowspan="{% if host.downtimes|length == 0 %}1{% else %}{{ host.downtimes|length }}{% endif %}" style="border-bottom: 1px solid black; border-right: 3px solid gray;">
{{ host.host }}
</th>
{% if host.downtimes|length == 0 %}
<td colspan="3" style="border-bottom: 1px solid black; border-right: 1px solid black;">
<em>no known downtimes.</em>
</td>
{% else %}
{% for downtime in host.downtimes %}
<td style="text-align: center;">
{{ downtime.0 }}
</td>
<td style="text-align: center;">
{% if downtime.1 == None %}
<em>ongoing</em>
{% else %}
{{ downtime.1 }}
{% endif %}
</td>
<td style="text-align: center;">
{% if downtime.2 == None %}
<em>unknown</em>
{% else %}
{{ downtime.2 }}
{% endif %}
</td>
{% set counter = loop.index + 1 %}
</tr><tr style="border-left: 1px solid black; border-right: 1px solid black;{% if counter >= host.downtimes|length %}border-bottom: 1px solid black;{% endif %}">
{% endfor %}
{% endif %}
</tr>
{% endfor %}
</table>
{% endif %}
<p style="font-size: 15px;">Powered by <a href="https://github.com/wichmannpas/simple_status">Simple Status</a>.</p>
</body>
</html>