{# Small events card used on every list page (catalog / machines) and on machine-detail. Renders up to N events (the caller picks how many) with a link to /ui/events for the full log. Called with: events (list of Event rows) scope ("catalog" | "machine" | ...) -- shown in the header + "all events" link's ?filter empty_message optional custom prompt when events is empty #} {% macro recent_events_card(events, scope, empty_message="") %}

Recent {{ scope }} events

All events
{% if events %}
{% for e in events %} {% endfor %}
When Kind Summary
{{ e.ts | fmt_ts }} {{ e.kind }} {{ e.summary or "" }}
{% else %}

{{ empty_message or "No " ~ scope ~ " events recorded yet." }}

{% endif %}
{% endmacro %}