{% extends "layout.html" %} {% from "_partials/table_helpers.html" import search_input, sort_header, pagination_inline %} {% from "_partials/recent_events.html" import recent_events_card %} {% from "_partials/page_description.html" import page_description %} {% block title %}Machines - pixie{% endblock %} {% block subnav %} {% endblock %} {% block content %} {{ page_description('pc-display', 'Every MAC pixie has seen. A row appears here on the target\'s first PXE contact; the last-seen columns refresh every 5 s while the page is open. Click a MAC to bind its boot mode, edit labels, or inspect the inventory and events for that target.') }}
Machines {{ search_input('/ui/machines', q, preserved, 'MAC / boot mode / sha / last IP') }} {{ pagination_inline(page_state, preserved, label='machines') }}
{% if machines %}
{{ sort_header('MAC', 'mac', sort, preserved) }} {{ sort_header('Boot mode', 'boot_mode', sort, preserved) }} {{ sort_header('Last seen', 'last_seen_at', sort, preserved) }} {% for m in machines %} {% endfor %}
Image InventoryActions
{{ m.mac }} {% if m.labels %}
{% for lbl in m.labels %} {{ lbl }} {% endfor %}
{% endif %}
{% if m.boot_mode == 'nbdboot' %} nbdboot {% else %} {{ m.boot_mode }} {% endif %} {% if m.image_content_sha256 %} {{ m.image_content_sha256[:12] }} {% else %} - {% endif %} {% if m.inventory %} {% set d = m.inventory.get("disks") or [] %} {{ d|length }} disk{{ '' if d|length == 1 else 's' }} {% if m.inventory.get("lshw") %} + lshw {% endif %} {% else %} - {% endif %} {{ m.last_seen_at | fmt_ts }} {% if m.last_seen_ip %}
{{ m.last_seen_ip }}{% endif %}
{# The MAC cell already links to the detail page; an "open" icon here is redundant. Keep only the destructive action, which needs its own control (a confirm-prompt on a link would be surprising). #}
{% else %}

{% if q %} No machines match {{ q }}. {% else %} No machines yet. Machines appear when a PXE-booting target hits /pxe/<mac>; open a machine to edit its binding. {% endif %}

{% endif %}
{{ recent_events_card(machine_events, "machine") }} {% endblock %}