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