feat(AuditLog): Add the organisation audit log page
TA
6h ago+1764+1764+0123456789012345678901234567890123456789-76-76-01234567890123456789
Thanks for submitting a PR! Please check the boxes below:
- I have read the Contributing Guide.
- I have added information to
docs/if required so people know about the feature. - I have filled in the "Changes" section below.
- I have filled in the "How did you test this code" section below.
Changes
Contributes to #8889
The organisation audit log page, on the endpoints from #8921. It sits behind the organisation_audit_log flag and is shown to organisation admins only.
- New Audit Log tab in the organisation nav.
- Logs grouped by day. Each row shows the project and environment, and expands to the field changes. When a log has no field changes, the row links to the related object instead.
- Search, Clear all and paging. The search lives in the URL.
- Loading, empty, no access and error states.
A new list rather than the project page's AuditLog: it uses no Flux stores, so the project page can move onto it later.
Shared changes, not behind the flag:
Accordiongets a controlledopenand arowvariant, and the rows use it. Its other users (release pipeline status, environment metrics, pending change requests) keep the card look.ColorSwatchtakes children and anxlsize. The project initial in each row is built on it.- The project palette and contrast colour move out of
UtilsintopaletteColour, so Jest can test them.Utilsstill exports them, so existing callers don't change. - New
--always-blacktoken, the pair of--always-white, for the initial on light palette colours.
Next: filtering by scope (#8941), then the stories and the RTL tests.
How did you test this code?
- Unit tests for the filters, URL round trip, day grouping, error kinds, related object links and palette colours.
- By hand against a local API: with the flag on, open Organisation → Audit Log, search, expand a row and page through.