endstat/templates/index.html

76 lines
1.8 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Endstat</title>
<link href="https://fonts.googleapis.com/css?family=Montserrat:200|Source+Code+Pro:400" rel="stylesheet">
<style>
body {
background-color: #212121;
color: #fff;
font-family: 'Montserrat', sans-serif;
width: 700px;
margin: 0 auto;
margin-top: 5rem;
}
main {
padding: 1rem 0;
}
header {
display: flex;
align-items: flex-end;
justify-content: space-between;
}
section {
display: flex;
align-items: stretch;
background-color: #424242;
margin: 1rem 0;
border-radius: 1rem;
}
p { margin: 0; }
a {
color: #fff;
text-decoration: none;
}
h1 { display: block; margin: 0; }
h3 { margin-top: 0; }
.indicator {
width: 1rem;
min-height: 100%;
border-radius: 1rem 0 0 1rem;
margin-right: 1rem;
}
.ok { background-color: #4ed34e; }
.warn { background-color: #fcfc64; }
.error { background-color: #ff392e; }
.error-msg { font-family: 'Source Code Pro', monospace;}
</style>
</head>
<body>
<header>
<h1>Status Overview</h1>
<p>{{ results.timestamp_str }}</p>
</header>
{% for group in results.groups -%}
<h2>{{ group.label }}</h2>
{% for status in group.endpoints -%}
<section>
<aside class="indicator {% if status.status == 0 %}ok{% elif status.status == 1 %}warn{% else %}error{% endif %}"></aside>
<main>
<h3>{{ status.endpoint }}</h3>
<a href="{{ status.location }}">{{ status.location }}</a>
{% if status.error %}<p class="error-msg">{{ status.error }}</p>{% endif %}
</main>
</section>
{% endfor -%}
{% endfor -%}
</body>
</html>