{# status/rows.html — unified monitor list + summary, refreshed on poll #} {% macro uptime_cell(pct) %} {%- if pct is none -%} {%- elif pct >= 99.9 -%}{{ "%.2f"|format(pct) }}% {%- elif pct >= 99 -%}{{ "%.2f"|format(pct) }}% {%- elif pct >= 95 -%}{{ "%.2f"|format(pct) }}% {%- else -%}{{ "%.2f"|format(pct) }}% {%- endif -%} {% endmacro %} {# ── Summary ─────────────────────────────────────────────────────────────── #}
Up
{{ up }}
Down
{{ down }}
Pending
{{ pending }}
{% if not entries %}
No monitors configured yet. Add hosts (ping / DNS) or HTTP monitors to populate the board.
{% else %}
{# header row #}
Monitor Recent checks Latest 24h 7d 30d TLS
{% for e in entries %}
{# name + kind #}
{% if e.detail_url %}{{ e.name }} {% else %}{{ e.name }}{% endif %}
{{ e.kind }} · {{ e.target }}
{# heartbeat bar #}
{% set pad = 30 - e.heartbeat|length %} {% if pad > 0 %}{% for _ in range(pad) %}{% endfor %}{% endif %} {% for hb in e.heartbeat %} {% endfor %}
{# latest latency + sparkline #}
{% if e.status == 'down' %}DOWN {% elif e.latency_ms is not none %} {% if e.spark_svg %}{{ e.spark_svg|safe }}
{% endif %} {{ "%.0f"|format(e.latency_ms) }} ms {% elif e.status == 'up' %}UP {% else %}{% endif %}
{# uptime windows #} {{ uptime_cell(e.uptime.get('24h')) }} {{ uptime_cell(e.uptime.get('7d')) }} {{ uptime_cell(e.uptime.get('30d')) }} {# TLS expiry countdown #} {% if e.tls_days is none %} {% elif e.tls_days < 0 %}expired {% elif e.tls_days < 14 %}{{ e.tls_days|round|int }}d {% elif e.tls_days < 30 %}{{ e.tls_days|round|int }}d {% else %}{{ e.tls_days|round|int }}d{% endif %}
{% endfor %}

Heartbeat shows the last 30 checks (newest on the right). Uptime % is over the rolling window. TLS countdown applies to HTTPS monitors.

{% endif %}