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

Event log

slim audit trail of operator + machine activity
{# Filter form. GET so links stay shareable + back-button friendly. #}
{% if not events %}
No events match the current filter. The log starts populating as machines check in and operators make changes; if you've just started bty-web, hit a few endpoints and refresh.
{% else %}
{% for e in events %} {% endfor %}
When Kind Summary Subject Actor Source IP
{{ e.ts }} {# Badge colour: failure kinds (anything ending ``.failed`` or ``_failed``) override to danger so they pop in the log. Otherwise a per-family map; unknown families fall back to the neutral light badge. #} {% set family = e.kind.split('.')[0] %} {% set badge_map = { 'machine': 'bg-info text-dark', 'image': 'bg-primary', 'catalog': 'bg-secondary', 'boot': 'bg-warning text-dark', 'settings': 'bg-dark', } %} {% if e.kind.endswith('.failed') or e.kind.endswith('_failed') %} {% set badge = 'bg-danger' %} {% else %} {% set badge = badge_map.get(family, 'bg-light text-dark border') %} {% endif %} {{ e.kind }} {{ e.summary }} {% if e.subject_kind == "machine" and e.subject_id %} {# Machine subjects link directly to the per-machine detail page (the per-machine events card is already there). #} {{ e.subject_id }} {% elif e.subject_id %} {# Non-machine subjects (image, catalog, boot, settings) don't have a detail page; pivot to the timeline filtered by this subject so the operator can see everything that touched it. #} {{ e.subject_id }} {% else %} - {% endif %} {% if e.actor %} {# Click to pivot: filter the timeline down to rows with this actor (operator / system / pxe-client). #} {{ e.actor }} {% else %} - {% endif %} {% if e.source_ip %} {# Click to pivot: same /ui/events page filtered down to this IP. Useful for "what else did this workstation / target do?". #} {{ e.source_ip }} {% else %} - {% endif %}
{% endif %} {% endblock %}