{# Partial: audit log results table. Used by: - audit/list.html (full page) - /audit/tail endpoint (HTMX live polling) Context: - logs: list of AuditLog - search, event_type, action, outcome: current filters - page, per_page, total, total_pages: pagination - live_tail: bool — when true, the wrapping div polls /audit/tail and renders a "live" badge This partial owns the wrapping `
| Timestamp | Event | Subject | Resource | Outcome | View |
|---|---|---|---|---|---|
|
{{ log.timestamp.strftime('%Y-%m-%d') }}
{{ log.timestamp.strftime('%H:%M:%S') }}
|
{{ log.event_type }}
{{ log.action }}
|
{% if log.subject_id %} {{ log.subject_id[:8] }}... {% else %} - {% endif %} | {% if log.resource_type and log.resource_id %} {{ log.resource_type }}:{{ log.resource_id[:8] }}... {% elif log.resource_type %} {{ log.resource_type }} {% else %} - {% endif %} | {% if log.outcome == 'success' %} Success {% elif log.outcome == 'failure' %} Failure {% else %} {{ log.outcome or 'Unknown' }} {% endif %} | View, {{ log.id }} |
{% if search or event_type or action or outcome %} No events match your current filters. {% else %} No security events have been logged yet. {% endif %}