{% extends "ui/_layout.html" %} {% block title %}Dashboard - bty-web{% endblock %} {% block subnav %} {# In-page jump links to the dashboard's panels, separated by rules. #} {% endblock %} {% block intro %} {% from "ui/_intro_box.html" import render as intro_box %} {% call intro_box() %} Fleet overview. Counters and recent activity update live as machines check in via PXE, operators bind catalog entries to MACs, image uploads complete, and target boxes signal flash-done. Drill into any count to see the underlying rows. {% endcall %} {% endblock %} {% block content %} {# Top row: three independent, equally-spaced panels. Each is a direct grid column so Bootstrap's gutters apply uniformly (an earlier display:contents wrapper bundled Machine + Images and ate their gutter). The row opens one SSE connection; the Machine Summary + Images columns each swap their own event (``dashboard-machine`` / ``dashboard-images``) live on machine mutations / image changes. Health Monitoring is rendered at request time (reload to refresh) -- its checks shell out, so we don't want them on every check-in. #}
{% include "ui/_dashboard_machine.html" %}
{% include "ui/_dashboard_images.html" %}
Health Monitoring {# Info rows (advisory, e.g. dedicated-disk state) are excluded from the pass/fail count: they're neither OK nor not-OK, just informational. #} {% set _checks = sanity | rejectattr("info") | list %} {% set _ok = _checks | selectattr("ok") | list | length %} {{ _ok }} / {{ _checks | length }} OK
    {% for s in sanity %} {# Whole row links to the fix page on failure, else the view page -- keeps the panel compact (no separate button) at one-third width. Info rows render a blue "i" instead of a check/cross and carry no link. #}
  • {% if s.info %} {# Advisory row: always the neutral info colour, never green/red. It's a "nice to have", not a pass/fail -- a blue "i" you might act on but that never alarms. #} {% elif s.ok %} {% else %} {% endif %} {% if s.href or s.fix_href %} {{ s.label }}
    {{ s.detail }}
    {% else %}
    {{ s.label }}
    {{ s.detail }}
    {% endif %}
  • {% endfor %}
{# Recent activity slice -- reuses the per-subject events card. Static at request time (reload to refresh); the live SSE stream is wired to the counters above, not here. #} {% with events=recent_events, title="Recent Events", link_to_full="/ui/events", card_id="dash-activity" %} {% include "ui/_events_card.html" %} {% endwith %} {% endblock %}