{% extends "base.html" %} {% from "_macros.html" import crumbs, page_header, stat_tile, status_badge, icon_button, empty_state %} {# One monitor: its state and since when, latency and uptime against Settings → Thresholds, its last checks, and the failures behind them. #} {% block title %}{{ monitor.name }} — Monitors — Steward{% endblock %} {% block breadcrumb %}{{ crumbs([("Monitors", "/monitors/"), (monitor.name, "")]) }}{% endblock %} {% block content %} {% set can_edit = session.user_role in ['operator', 'admin'] %} {% call page_header(monitor.name, (monitor.type|monitor_type) ~ " · " ~ monitor.target) %} {% if can_edit %} {{ icon_button("✎", "Edit " ~ monitor.name, href="/monitors/" ~ monitor.id ~ "/edit") }}
{% endif %} {% endcall %}Newest on the right.{% if latest %} Last checked {{ latest.checked_at|ago }}.{% endif %}
{% else %} {{ empty_state("Not checked yet. The first check runs on the next scheduler tick." if monitor.enabled else "Paused, and never checked.") }} {% endif %}| When | Error | {% if monitor.type == "http" %}Status | {% endif %}
|---|---|---|
| {{ f.checked_at|ago }} | {{ f.error_msg or "Down" }} | {% if monitor.type == "http" %}{{ f.status_code or "—" }} | {% endif %}