Audit log: the record panel, an honest count line, no nested scroll #342
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "audit-record"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Mockup-approved implementation of the Audit log page (both tabs).
Backend
Queryalready computed the number of matching events (the scan has to visit every candidate line either way) and discarded it at the truncation, so the panel could only ever say "200 shown" and never what it was 200 of.QueryWithTotalreturns it;Querydelegates. No extra I/O.Info()describes the record itself: event count, oldest event, month-file directory, retention.dirandretainMonthswere unexported with no accessor, which is the whole reason this was previously filed as "blocked on the backend". Counting is a newline scan cached on (size, mtime), so a rotated month is read once per process and only the live month is rescanned.New endpoint
GET /api/v1/admin/audit/info, 404 when there is no logger — the same signal the query endpoint gives, which the panel already reads as "not enabled on this server".Tests in
internal/audit/record_test.go: total beyond the limit, total under a filter, counts/months/oldest, cache invalidation after an append, empty dir, nil logger.Frontend
ul.plainlistcaps every list at45vhwith its ownoverflow-y:auto; inside an already-scrolling page that is a nested scroll region, and the macOS overlay thumb stays invisible until touched. The admin rule already won foroverflow; onlymax-heightsurvived. Now overridden — the page scrolls, the log does not.#audit-countwas never inSET_SLOTS. The filter and the list are moved into the admin shell at runtime; the count line between them was not, so it stayed parked inside the closed<dialog>and has never once been visible on the admin page. Added.audCapem dash removed, per the standing copy rule.Append-onlychip, plus the note explaining why export is a file copy rather than a download button.denied · <reason>, where the reason stays the server's own recorded words.All new copy is in en/de/fr/it.