{% load humanize hc_extras tz %} {% regroup checks by project as groups %} {% timezone tz %} {% spaceless %} {% for group in groups %} {% for dt in boundaries %} {% endfor %} {% for check in group.list|sortchecks:sort %} {% for d in check.past_downtimes %} {% if d.count %} {% else %} {% endif %} {% endfor %} {% endfor %} {% endfor %}
{{ group.grouper|mangle_link }} {% if monthly_or_weekly == "weekly" %} {{ dt|date:"M j"}} - {{ dt|add6days|date:"M j"}} {% else %} {{ dt|date:"N Y"}} {% endif %}
{% with check.get_status as status %} {% if status == "new" %} {% elif status == "paused" %} {% elif status == "grace" %} {% elif status == "up" %} {% elif status == "down" %} {% endif %} {% endwith %}
NEWPAUSEDLATEUPDOWN
{% if check.name %} {{ check.name|mangle_link }} {% else %} unnamed {% endif %} {% if check.tags %}
{% for tag in check.tags_list %} {% endfor %}
{{ tag|mangle_link }}
{% endif %}
{{ d.count }} downtime{{ d.count|pluralize }},
{{ d.duration|hc_approx_duration }} total
{% if d.no_data %} {% comment %} The check didn't exist yet {% endcomment %} {% else %} All good! {% endif %}

{% endspaceless %} {% endtimezone %}