endstat/templates/index.html
2019-05-01 16:15:18 -04:00

72 lines
1.7 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;
margin: 0;
color: #fff;
font-family: 'Montserrat', sans-serif;
}
main {
width: 700px;
margin: 0 auto;
margin-top: 5rem;
}
header {
display: flex;
align-items: flex-end;
justify-content: space-between;
}
section {
display: flex;
align-items: stretch;
justify-content: space-between;
background-color: #424242;
margin: 1rem 0;
padding: 1rem;
border-radius: 1rem;
}
p { margin: 0; }
h1 { display: block; margin: 0; }
h3 { margin-top: 0; }
.indicator {
width: 1rem;
height: 1rem;
border-radius: 1rem;
}
.ok { background-color: green; }
.warn { background-color: yellow; }
.error { background-color: red; }
.error-msg { font-family: 'Source Code Pro', monospace;}
</style>
</head>
<body>
<main>
<header>
<h1>Status</h1>
<p>{{ results.timestamp_str }}</p>
</header>
{% for status in results.statuses -%}
<section>
<div>
<!-- <p>{{ status.domain }}</p> -->
<h3>{{ status.endpoint }}</h3>
<p>{{ status.location }}</p>
{% if status.error %}<p class="error-msg">{{ status.error }}</p>{% endif %}
</div>
<aside class="indicator {% if status.status == 0 %}ok{% elif status.status == 1 %}warn{% else %}error{% endif %}"></aside>
</section>
{% endfor -%}
</main>
</body>
</html>