Commit b13dfce3 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Add /health page

parent 894eba56
......@@ -244,6 +244,11 @@ def net_draw(net, alt=None):
except KeyError:
def health_page():
global entries
return render_template('health.html', entries=entries.values())
def api():
return render_template('api.html')
{% extends "base.html" %}
{% from 'macros.html' import fmt_int, fmt_float %}
{% block net_active %}
{% endblock %}
{% block content %}
<div class="column-group">
<div class="xlarge-100 large-100 small-100 bottom-space">
<table class="ink-table hover sortable">
<th class="align-left tight">Name</th>
<th class="align-left">Title</th>
<th class="align-left tight">Upstream status</th>
<th class="align-left">Last checked</th>
{% for entry in entries %}
<td class="mono"> <a href="/net/{{ }}">{{ }}</a> </td>
<td> {{ entry.title }} </td>
{% if entry.orphan %}
<span class="ink-label grey" title="Upstream is no more. It has ceased to be. It has expired and gone to meet its maker. It's an ex-upstream!"></span>
{% elif entry.upstream_status[0] == 200 %}
<span class="ink-label green" title="Upstream health OK.">OK</span>
{% else %}
<span class="ink-label red" title="Upstream health NOT OK!">{{entry.upstream_status[0]}}</span>
{% endif %}
{% endfor %}
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment