{{define "title"}}Audit · restic-manager{{end}} {{define "content"}} {{$page := .Page}} {{$filter := $page.Filter}} {{$rng := $page.Range}}
{{/* crumbs */}}
Dashboard/ audit
{{/* page header */}}

Audit log {{len $page.Entries}} entries · last {{if eq $rng "all"}}all-time{{else}}{{$rng}}{{end}}

{{/* Export carries the current filter querystring so the download is exactly what the operator sees on screen (up to a higher row cap of 5000 vs 500 in the table). */}} Export CSV ↓
Append-only history of every operator action, agent message, and system-driven change. Read-only — entries cannot be edited or deleted.
{{/* filter strip */}}
{{/* time-range pills */}}
{{range list "24h" "7d" "30d" "all"}} {{$r := .}} {{$active := eq $r $rng}} {{if eq $r "all"}}All{{else}}{{$r}}{{end}} {{end}}
{{/* user dropdown */}}
{{/* actor dropdown — user/agent/system */}}
{{/* target kind dropdown */}}
{{/* action substring search */}}
{{if $filter.UserID}}{{end}} {{if $filter.Actor}}{{end}} {{if $filter.TargetKind}}{{end}}
{{/* table */}}
{{/* Header — every column except the payload one is a clickable sort link. Hrefs are pre-built server-side ($page.SortHrefs) so the URL escaping rules don't trip on the '=' chars when html/template encodes attributes. */}} {{if eq (len $page.Entries) 0}}
No matching entries.
{{if eq $rng "24h"}}Try widening the time range.{{else}}Adjust filters or pick a longer range.{{end}}
{{else}} {{range $page.Entries}} {{$e := .}}
{{absTime $e.TS}}
{{if eq $e.Actor "user"}}user {{else if eq $e.Actor "agent"}}agent {{else}}system{{end}}
{{if $e.UserID}}{{$un := index $page.UserNames (deref $e.UserID)}}{{if $un}}{{$un}}{{else}}{{deref $e.UserID}}{{end}}{{else}}{{end}}
{{$e.Action}}
{{if $e.TargetKind}} {{deref $e.TargetKind}} {{if $e.TargetID}} {{$tid := deref $e.TargetID}} {{if eq (deref $e.TargetKind) "host"}}{{$hn := index $page.HostNames $tid}}{{if $hn}} · {{$hn}}{{else}} · {{$tid}}{{end}} {{else}} · {{$tid}}{{end}} {{end}} {{else}} {{end}}
{{if and $e.Payload (gt (len $e.Payload) 2)}} {{/* Payload is base64-encoded onto a data- attribute to bypass html/template's contextual JS-string escaping (which would double-escape arbitrary JSON inside a {{end}}