{% extends "ui/_layout.html" %} {% block title %}{{ m.mac }} - bty-web{% endblock %} {% block content %}

{{ m.mac }}

Discovered
{{ m.discovered_at or "-" }}
Last seen
{{ m.last_seen_at or "-" }}{% if m.last_seen_ip %} from {{ m.last_seen_ip }}{% endif %}
Last flashed
{{ m.last_flashed_at or "-" }}
Last task
{% if m.last_task_status %} {# Badge mapping: running=info (in flight), completed= success (rc=0), cancelled=warning (operator abort), failed=danger (rc!=0 / timeout). v0.7.37 renamed ``success`` -> ``completed`` and added ``cancelled`` so the vocabulary lines up with the other manager-driven jobs (hashes, downloads, release-fetches). #} {% set badge_map = { 'running': 'bg-info', 'completed': 'bg-success', 'cancelled': 'bg-warning text-dark', 'failed': 'bg-danger', } %} {% set badge = badge_map.get(m.last_task_status, 'bg-light text-dark border') %} {{ m.last_task_status }} at {{ m.last_task_run_at }} {% if m.last_task_output_path %}
output: {{ m.last_task_output_path }}
{% endif %} {# Cancel button when a task is in flight. Hits ``DELETE /tasks/{mac}``; the manager's cancel() sets the per-task threading.Event and SIGTERMs the cijoe subprocess. #} {% if m.last_task_status == 'running' %} {% endif %} {% else %} - {% endif %}
Created
{{ m.created_at }}
Updated
{{ m.updated_at }}

Assignment

local: PXE boots return sanboot (production / stable). flash: PXE boots chain into the live env so the box re-flashes the assigned image every time (per-job CI cadence). tui: PXE boots chain into the live env in interactive mode (bty-tui on tty1) so the operator picks an image from the server's catalog by hand. The auto-discovery default for unknown MACs is tui; you can flip a known machine here. Completion (POST /pxe/{mac}/done) updates last flashed but never flips the policy - the operator flips back to local when they want the box to stop reflashing.
{# Per-MAC event slice. Filtered to ``subject_kind=machine`` + ``subject_id=this MAC`` server-side; the link forwards the same filter to /ui/events for drill-down. #} {% with events=machine_events, title="Recent activity for this machine", link_to_full="/ui/events?subject_kind=machine&subject_id=" + m.mac %} {% include "ui/_events_card.html" %} {% endwith %} {% endblock %}