{# ``py-1`` + ``flex-nowrap`` keep the header a single tight row
around the inline add-MAC form: default padding plus a wrap to a
second line made the bar much taller than a table row. The input
shrinks rather than wrapping on a narrow window. #}
{# Pin the narrow columns to width:1% + nowrap (as the
other tables do) so they stay tight and only MAC /
Image / Hostname absorb the slack -- otherwise the
header columns stretch evenly and look oversized. #}
| MAC |
Image |
Boot |
Hostname |
Last seen |
Last flashed |
|
{# The tbody subscribes to the SSE stream so it auto-updates
when the operator (or auto-discovery) mutates machines.
The browser carries the bty-token cookie automatically;
that is what authenticates the EventSource connection.
``sse-target`` opts in to the layout-level flash animation.
When a server-side filter is active (``?filter=...``)
the SSE wiring is dropped: the next ``machines-update``
would replace the filtered tbody with the full
un-filtered list, which is operator-confusing. The page
becomes static under filter; reload to refresh. #}
{% include "ui/_machines_tbody.html" %}
{# Recent machine activity (discoveries, flashes, inventory posts). The
"Activity" sub-nav anchor jumps here; always rendered (empty-state
row when there's nothing yet). #}
{% with events=machine_events,
title="Recent Events",
link_to_full="/ui/events?subject_kind=machine",
card_id="machines-activity" %}
{% include "ui/_events_card.html" %}
{% endwith %}
{% endblock %}