From cfbe34a22cce106450b8f466709df2f397f4c995 Mon Sep 17 00:00:00 2001 From: nxm Date: Sun, 3 May 2026 21:11:22 +0200 Subject: [PATCH] Add page description, local timezone display, and auto-refresh Co-Authored-By: Claude Sonnet 4.6 --- main.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 1faca3b..1f4b732 100644 --- a/main.py +++ b/main.py @@ -46,7 +46,7 @@ def read_agent_status(name: str) -> dict: def render_html(services: list, agents: list) -> str: - now = datetime.now().strftime("%Y-%m-%d %H:%M") + now_iso = datetime.now(timezone.utc).isoformat() SERVICE_COLOURS = {"up": "#3fb950", "degraded": "#d29922", "down": "#f85149"} AGENT_COLOURS = {"success": "#3fb950", "failure": "#f85149"} @@ -67,7 +67,8 @@ def render_html(services: list, agents: list) -> str: agent_rows = "" for a in agents: colour = AGENT_COLOURS.get(a["status"], "#8b949e") - ts = a["timestamp"][:16].replace("T", " ") + " UTC" if a["timestamp"] else "—" + raw_ts = a["timestamp"] + ts = f'' if raw_ts else "—" agent_rows += f""" {a['name']} @@ -81,12 +82,14 @@ def render_html(services: list, agents: list) -> str: + Varys — Status