{% from "partials/_macros.html" import card_header, pagination_bar, verdict_pill %} {# tracks which subsystem tab is active so the tabpanel can point its aria-labelledby at it (set in the tablist loop below) #} {% set active_tab = namespace(id='auth-tab-0') %} {% set sub_cls = { 'TCC': 'bg-sky-900/40 text-sky-300 border-sky-900/60', 'securityd': 'bg-red-900/30 text-red-300 border-red-900/50', 'syspolicy': 'bg-amber-900/30 text-amber-300 border-amber-900/50', 'Authorization': 'bg-violet-900/40 text-violet-300 border-violet-900/60', 'loginwindow': 'bg-emerald-900/30 text-emerald-300 border-emerald-900/50', 'launchservices':'bg-slate-700/60 text-slate-300 border-slate-600', 'opendirectoryd':'bg-slate-800 text-slate-400 border-slate-700', } %}
{{ card_header("auth events — aggregated patterns") }} {% if events %} {# ----- headline stats ----- #}
{{ "{:,}".format(events.total_events) }}
total events
{{ "{:,}".format(events.total) }}
unique patterns
{# ----- subsystem tabs: filter the table by subsystem; each tab shows its event count so the breakdown is visible and interactive at once (replaces the old static summary cards + subsystem dropdown). ----- #}
{% for tab in events.subsystem_tabs %} {% set is_active = (tab.val == events.subsystem) %} {% if is_active %}{% set active_tab.id = 'auth-tab-' ~ loop.index0 %}{% endif %} {% endfor %}
{% endif %} {# ----- filter bar ----- #}
{# subsystem is chosen via the tablist above; carried here so the search / verdict / sort / per-page controls preserve the active subsystem #} {# sort toggle — verdict severity vs count #} {% set cur_sort = events.sort if events else 'count' %} {% if events %}{{ "{:,}".format(events.total) }} pattern{{ 's' if events.total != 1 else '' }}{% endif %}
{% if events and events.rows %}
{% for e in events.rows %} {% set detail_id = "ae-detail-" ~ loop.index %} {# expandable reasoning row #} {% if e.reasoning %} {% endif %} {% endfor %}
verdict count process subsystem message last seen
{% if e.verdict %}{{ verdict_pill(e.verdict, e.confidence) }} {% else %}pending{% endif %} {{ "{:,}".format(e.count) }} {{ e.process }} {% if e.subsystem_short and e.subsystem_short != '—' %} {{ e.subsystem_short }} {% else %} {% endif %} {{ e.message }} {{ e.last_seen | datetime_fmt }}
{{ pagination_bar("auth-events", events.page, events.total_pages, events.total, events.rows|length, events.per_page, per_page_options) }} {% elif events %}
no patterns match — try clearing the filters
{% else %}
no auth events yet — the monitor tails the macOS unified log; events appear as they occur
{% endif %}
{# /auth-events-panel #}