46 lines
1.2 KiB
HTML
46 lines
1.2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html lang="en-gb" xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
<title>{{ cfg.web.name }}</title>
|
|
<link href="/static/style.css" rel="stylesheet" />
|
|
</head>
|
|
|
|
<body>
|
|
<h2>{{ cfg.web.name }}</h2>
|
|
|
|
{% set services_by_cat = {} %}
|
|
{% for s in services %}
|
|
{% set cat = s.category if s.category else "__none__" %}
|
|
{% set _ = services_by_cat.setdefault(cat, []).append(s) %}
|
|
{% endfor %}
|
|
|
|
{% for cat, cat_services in services_by_cat.items() %}
|
|
{% if cat != "__none__" %}
|
|
<h3>{{ cat }}</h3>
|
|
{% endif %}
|
|
|
|
{% for service in cat_services %}
|
|
<div class="service">
|
|
<p><b>{{ service.name }}</b></p>
|
|
<div class="status">
|
|
{% for ping in uptime[service.name] %}
|
|
{% if ping == "I" %}
|
|
<p class="green">█</p>
|
|
{% elif ping == "O" %}
|
|
<p class="red">█</p>
|
|
{% else %}
|
|
<p class="grey">█</p>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</body>
|
|
|
|
</html>
|