{{ 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 %}