-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-de.html
103 lines (97 loc) · 3.74 KB
/
template-de.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>Stand: {{ time }}</p>
<h3>Aktuelle Erreichbarkeit</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>Durchschnittliche Erreichbarkeit</h3>
<p>Seit {{ stats_first }}</p>
<table style="width: 100%;">
<tr>
<th style="text-align: left;">Dienst</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>Bisherige Downtimes</h3>
<table style="width: 100%; border-collapse: collapse;">
<tr>
<th></th>
<th>Beginn</th>
<th>Ende</th>
<th>Grund</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>keine Downtimes bekannt.</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>andauernd</em>
{% else %}
{{ downtime.1 }}
{% endif %}
</td>
<td style="text-align: center;">
{% if downtime.2 == None %}
<em>unbekannt</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>