feat(monitors): Monitors absorbs the Status page; Status is removed (#5270)
CI / lint (push) Successful in 4s
CI / integration (push) Successful in 1m10s
CI / unit (push) Successful in 1m36s
CI / publish (push) Successful in 1m28s

Status repeated the Monitors page's counts, check strip and uptime. Monitors
now has one header row and every column Status had: the last 30 checks,
latest response with its trend, uptime over 24h / 7d / 30d (the range picker
goes) and TLS days on every row. /status and /status/rows and the nav link
are removed outright; the dashboard Overview (/status/widget) stays and its
Details link goes to Monitors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-07 15:36:38 -04:00
co-authored by Claude Opus 5.5
parent eaf9f1bcb8
commit 434127b3e1
16 changed files with 72 additions and 256 deletions
+2 -1
View File
@@ -1 +1,2 @@
# steward/status/ — unified monitor-status surface (page + dashboard widget)
# steward/status/ — the dashboard Overview widget (/status/widget). The Status
# page it once sat beside was folded into Monitors (#5270).
+1 -26
View File
@@ -4,7 +4,7 @@ from sqlalchemy import func, select
from steward.alerts.service import active_alerts, alert_label
from steward.auth.middleware import require_role
from steward.core.status import collect_status, sparkline_svg
from steward.core.status import collect_status
from steward.models.hosts import Host
from steward.models.users import UserRole
@@ -18,31 +18,6 @@ def _summarize(entries) -> tuple[int, int, int]:
return up, down, pending
@status_bp.get("/")
@require_role(UserRole.viewer)
async def index():
poll_interval = current_app.config.get("MONITORS_POLL_INTERVAL", 60)
return await render_template("status/index.html", poll_interval=poll_interval)
@status_bp.get("/rows")
@require_role(UserRole.viewer)
async def rows():
"""HTMX fragment — what is wrong (down monitors, active alerts), then the
full status list, refreshed on poll."""
async with current_app.db_sessionmaker() as db:
entries = await collect_status(db)
alerts = await active_alerts(db)
for e in entries:
if e.spark:
e.spark_svg = sparkline_svg(e.spark)
up, down, pending = _summarize(entries)
return await render_template(
"status/rows.html", entries=entries, up=up, down=down, pending=pending,
alerts=alerts, problems=[e for e in entries if e.status == "down"],
)
@status_bp.get("/widget")
@require_role(UserRole.viewer)
async def widget():