{% load humanize hc_extras %} {% regroup checks by project as groups %} {% for group in groups %} {% for dt in month_boundaries %} {% endfor %} {% for check in group.list|sortchecks:sort %} {% for boundary, seconds, count in check.past_downtimes %} {% if count %} {% else %} {% endif %} {% endfor %} {% endfor %} {% endfor %}
{{ group.grouper|mangle_link }} {{ dt|date:"N Y"}}
{% with check.get_status_with_started as status %} {% if status == "new" %} {% elif status == "paused" %} {% elif status == "grace" %} {% elif status == "up" %} {% elif status == "started" %} {% elif status == "down" %} {% endif %} {% endwith %}
NEWPAUSEDLATEUPSTARTEDDOWN
{% if check.name %} {{ check.name|mangle_link }} {% else %} unnamed {% endif %} {% if check.tags %}
{% for tag in check.tags_list %} {% endfor %}
{{ tag|mangle_link }}
{% endif %}
{{ count }} downtime{{ count|pluralize }},
{{ seconds|hc_approx_duration }} total
{% if count is None %} {% comment %} The check didn't exist yet {% endcomment %} {% else %} All good! {% endif %}