Audit log
Who did what to which thing, by day. Refusals say so; detail folds open.
import { AuditLog } from "@forgeron/ui";Today · Nov 18
- Camille Roydeployed
invoices-sync 1.4 - crm-importread
crm.leadsDenied
Yesterday · Nov 17
- Hugo Bernardinvited
lea@roy.fr
import { PackageIcon } from "@forgeron/icons";
import { AuditLog } from "@forgeron/ui";
export default function Default() {
return (
<div style={{ width: 400 }}>
<AuditLog
today="2026-11-18"
events={[
{
id: "e3",
at: "2026-11-18 09:42",
actor: "Camille Roy",
action: "deployed",
target: "invoices-sync 1.4",
},
{
id: "e2",
at: "2026-11-18 09:15",
actor: "crm-import",
actorIcon: PackageIcon,
action: "read",
target: "crm.leads",
outcome: "denied",
},
{
id: "e1",
at: "2026-11-17 17:03",
actor: "Hugo Bernard",
action: "invited",
target: "lea@roy.fr",
},
]}
/>
</div>
);
}Today · Nov 18
- Camille Roygave the team Sales access to
crm-import - Permission crm.leads.read is not granted to crm-import. Asked by Hugo Bernard.
- Upstream answered 503 three times; next try at 04:00.
Yesterday · Nov 17
- From 1.4.0 to 1.3.2 on Production. Reason: invoices arrive twice.
- Léa Martinchanged the secret
ODOO_API_KEY
Nov 12
- Camille Royinstalled
crm-import 0.9
import { PackageIcon, ServerStack01Icon } from "@forgeron/icons";
import { AuditLog } from "@forgeron/ui";
// A row with detail is a button: it folds open under itself.
export default function WithDetail() {
return (
<div style={{ width: "100%" }}>
<AuditLog
today="2026-11-18"
defaultExpanded={["e5"]}
events={[
{
id: "e6",
at: "2026-11-18 10:02",
actor: "Camille Roy",
action: "gave the team Sales access to",
target: "crm-import",
},
{
id: "e5",
at: "2026-11-18 09:15",
actor: "crm-import",
actorIcon: PackageIcon,
action: "read",
target: "crm.leads",
outcome: "denied",
detail:
"Permission crm.leads.read is not granted to crm-import. Asked by Hugo Bernard.",
},
{
id: "e4",
at: "2026-11-18 03:00",
actor: "Scheduler",
actorIcon: ServerStack01Icon,
action: "ran",
target: "carrier-rates nightly",
outcome: "failed",
detail: "Upstream answered 503 three times; next try at 04:00.",
},
{
id: "e3",
at: "2026-11-17 17:03",
actor: "Hugo Bernard",
action: "rolled back",
target: "invoices-sync 1.3",
detail: "From 1.4.0 to 1.3.2 on Production. Reason: invoices arrive twice.",
},
{
id: "e2",
at: "2026-11-17 16:40",
actor: "Léa Martin",
action: "changed the secret",
target: "ODOO_API_KEY",
},
{
id: "e1",
at: "2026-11-12 11:20",
actor: "Camille Roy",
action: "installed",
target: "crm-import 0.9",
},
]}
/>
</div>
);
}No event matches these filters
import { AuditLog } from "@forgeron/ui";
export default function Empty() {
return (
<div style={{ width: "100%", maxWidth: 520 }}>
<AuditLog events={[]} empty="No event matches these filters" />
</div>
);
}API → Props
| Prop | Type | Default | Description |
|---|---|---|---|
events | { id, at, actor, actorIcon?, action, target?, outcome?, detail? }[] | — | Newest first. at: YYYY-MM-DD HH:MM. outcome: ok, denied or failed. |
today | string | — | YYYY-MM-DD: its day and the one before read Today and Yesterday. |
defaultExpanded | string[] | — | Rows open at first. |
label | string | "Audit log" | Its name. |
empty | ReactNode | "Nothing happened yet" | Shown when there is no event. |
className | string | — | Extra classes. |