{% extends "base.html" %} {% from "_macros.html" import crumbs %} {% block title %}{{ host.name }} — Metrics — Steward{% endblock %} {% block breadcrumb %}{{ crumbs([("Hosts", "/hosts/"), (host.name, "/hosts/" ~ host.id), ("Metrics", "")]) }}{% endblock %} {% block content %} {# Shell only: current-state + history data stream in via HTMX so the heavy history query never blocks first paint and the data refreshes live (≈ the agent's push cadence). The chart CANVASES live here permanently — only their data is polled and applied in place, so refreshes never re-create/flicker. #}

{{ host.name }}

{% include "_time_range.html" %}
{# Current state — lazy + polled live. Atomic innerHTML swap of fixed-height cards, so values update without a layout jump. #}
Loading metrics…
{# History charts — persistent canvases (created once below); only data is polled. #}
Utilization % — last {{ current_range }}
Throughput (B/s) — last {{ current_range }}
Load & pressure — last {{ current_range }}
{# Hidden poller: fetches the history series and applies it to the charts above (no visible swap). Lazy on load → never blocks paint; refreshed slowly + on range change. #} {% endblock %}