shadcn.io is not affiliated with official shadcn/ui
Audit Log Actor Activity Monitoring Block for Ark UI
Eight actors (six people, two service accounts) with a 14-day activity line, today's event count against their own usual as a ratio, an Unusual word above three times, and a side cell with their last six actions and action mix.
Installation
Overview
See who is doing more than usual, not who is doing the most, with this audit view for React with Ark UI. It is Trailkeep, an audit-log service, and each actor is compared with their own median of the other 13 days: "x4.2" means four times their usual, and the word Unusual appears above three. In a hairline frame with a plus mark on each corner, a native table lists eight actors with a 14-day line (today in a heavier stroke), today's count and the ratio. The table sorts by ratio, highest first, or by name, with aria-sort on the headers. Choosing an actor fills the side cell with their last six actions (what they did, the resource in monospace, the time), the mix of read, write, admin and export events with counts, and the retention. The header sentence names the unusual actors from the numbers. Guides draw the frame and its bands; the entrance is CSS only.
FAQ
How do I use my own events?
Edit ACTORS: each has the 13 earlier days' counts (history), today's events by kind (mix: read, write, admin, export) and its last six actions as time|kind|verb|resource. Today's count is the sum of the mix, the usual is the median of the history, and the ratio, the Unusual word and the header sentence are worked out from them. The threshold is the LIMIT constant.
Why compare with the actor's own usual?
A service account that deploys all day and an analyst who exports once a week need different baselines. The median of the other 13 days ignores one-off spikes and today's own count, so a sudden jump stands out whoever it is.
How does sorting work?
The Actor and Against usual headers are buttons. Pressing one sorts by it; pressing it again reverses the order. The current column has aria-sort, and a polite status line says how the table is sorted. Choosing an actor never reorders the rows.