{# Reusable per-subject event card. Caller passes: - ``events`` -- iterable of bty.web._events_log.Event - ``title`` -- card title (e.g. "Recent activity") - ``link_to_full`` -- /ui/events URL (with subject filter applied) so the operator can drill into the full timeline. - ``card_id`` -- optional id on the card so an in-page sub-nav "Activity" anchor can jump to it. Always renders (an empty-state row when there are no events) so the "Activity" sub-nav anchor always has a target and the table is a stable fixture on the page. #}
{{ title }} {% if link_to_full %} full timeline {% endif %}
{% for e in events %} {% endfor %} {% if not events %} {% endif %}
When Kind Summary Source IP
{{ e.ts | fmt_ts }} {% 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', 'auth': 'bg-success', } %} {% 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 | linkify }} {% if e.source_ip %} {{ e.source_ip }} {% else %} - {% endif %}
No activity yet. Events appear here as machines check in, operators make changes, and background jobs run.