Skip to content
Open
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
0c49f07
Use WIP audit log Omicron API
benjaminleonard Jul 8, 2025
91ea5ec
Stub out virtualised audit log page
benjaminleonard Jul 8, 2025
5eb3ec0
Denser inputs
benjaminleonard Jul 8, 2025
fdb4506
Re-add missing link
benjaminleonard Jul 8, 2025
35be627
Update API
benjaminleonard Jul 8, 2025
82e58ac
Merge branch 'main' into audit-log
benjaminleonard Jul 8, 2025
8c25eb0
Mock type fixes
benjaminleonard Jul 8, 2025
9d46415
merge main, resolve conflicts, tweak some stuff
david-crespo Jul 23, 2025
accfe37
move audit log to a system page
david-crespo Jul 23, 2025
34b7437
fix path and breadcrumbs snapshot tests
david-crespo Jul 23, 2025
b19f5d1
merge main, bump api, and fix type errors
david-crespo Aug 4, 2025
c6f5d96
take out json stuff and row expansion
david-crespo Aug 5, 2025
09b1df8
don't define components in render
david-crespo Aug 5, 2025
98ccb62
make fewer than 200000 mock audit log entries (fix test failure)
david-crespo Aug 5, 2025
28e9807
rename auditLogs to auditLog everywhere
david-crespo Aug 5, 2025
f0ab97b
show user and silo IDs with middle truncation
david-crespo Aug 5, 2025
0018531
put back the expandable JSON thing and fix the height
david-crespo Aug 5, 2025
0f6bde1
request_uri is the full URI
david-crespo Aug 5, 2025
f50cc3a
camelToSnakeJson for json body
david-crespo Aug 5, 2025
849e425
make HighlightJSON a normal recursive component
david-crespo Aug 6, 2025
3d1b37a
fix date rendering
david-crespo Aug 6, 2025
ea4142a
fix a11y lint error by making rows focusable and interactive
david-crespo Aug 6, 2025
fb15493
update API for auth_method -> access_method
david-crespo Aug 7, 2025
07dc1ea
merge main
david-crespo Aug 8, 2025
c1dab54
merge main
david-crespo Aug 15, 2025
4703c88
sort by time descending in API call, fix timestamp col width
david-crespo Aug 15, 2025
0455abe
real status code display and remove POST
david-crespo Aug 15, 2025
11f173d
Fix overflow
benjaminleonard Aug 22, 2025
7ff174f
Pane and loading state
benjaminleonard Sep 22, 2025
fe7397d
Merge branch 'main' into audit-log
benjaminleonard Sep 22, 2025
42fbfd0
Error state
benjaminleonard Sep 22, 2025
448a525
Error border tweak
benjaminleonard Sep 22, 2025
d7e395c
Border edge case fix
benjaminleonard Sep 22, 2025
7d7dcf4
merge main
david-crespo Apr 20, 2026
a7b054b
Merge branch 'main' into audit-log
benjaminleonard May 18, 2026
9d6b284
Reduce listbox height
benjaminleonard May 18, 2026
4957378
Fix virtualiser after scroll change
benjaminleonard May 18, 2026
2b6ea95
Keyboard navigate audit log rows
benjaminleonard May 18, 2026
351b248
Perf improvements
benjaminleonard May 18, 2026
7efaacf
Smaller screen improvements and design tidbits
benjaminleonard May 18, 2026
cebc838
Add license to `useWindowSize`
benjaminleonard May 18, 2026
d5e6b05
Improve load more button
benjaminleonard May 18, 2026
f07b8fe
Make `copyToClipboard` scale less dramatic
benjaminleonard May 18, 2026
01a735c
Overlap expanded item over header row also
benjaminleonard May 20, 2026
0c80626
Fix syntax highlighting
benjaminleonard May 20, 2026
667f7ae
Only scroll to on click not keyboard nav
benjaminleonard May 20, 2026
deec8eb
Fix gradient on light mode
benjaminleonard May 20, 2026
64d360e
Fix selected item header alignment
benjaminleonard May 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 23 additions & 21 deletions app/pages/system/AuditLog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,25 @@ import { Badge } from '~/ui/lib/Badge'
import { Button } from '~/ui/lib/Button'
import { PageHeader, PageTitle } from '~/ui/lib/PageHeader'
import { Spinner } from '~/ui/lib/Spinner'
import { classed } from '~/util/classed'
import { toSyslogDateString, toSyslogTimeString } from '~/util/date'
import { docLinks } from '~/util/links'

export const handle = { crumb: 'Audit Log' }

// todo
// might want to still render the items in case of error
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, we could just add a banner and a refresh. What type of error could we expect here? If you were no longer authorised you'd be logged out? Just a general server error retrieving?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Errors should be pretty unlikely if you can get to the page at all, so I’d say keep it very generic.

const ErrorState = () => {
return <div>Error State</div>
}

// todo
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'll do a skeleton state that is essentially a bunch of empty items to avoid too much layout shift when they load

const LoadingState = () => {
return <div>Loading State</div>
}

const HeaderCell = classed.div`text-mono-sm text-tertiary`

// for virtualizer
const estimateSize = () => 36

Expand Down Expand Up @@ -87,7 +101,7 @@ export default function SiloAuditLogsPage() {
overscan: 20,
})

const LogTable = () => (
const logTable = (
<>
<div
className="relative w-full"
Expand Down Expand Up @@ -115,7 +129,6 @@ export default function SiloAuditLogsPage() {
style={{
gridTemplateColumns: '7rem 4.25rem 180px 120px 120px 120px 300px 300px',
}}
onClick={() => {}}
>
<div className="overflow-hidden whitespace-nowrap text-mono-sm">
<span className="text-tertiary">
Expand Down Expand Up @@ -172,17 +185,6 @@ export default function SiloAuditLogsPage() {
</>
)

// todo
// might want to still render the items in case of error
const ErrorState = () => {
return <div>Error State</div>
}

// todo
const LoadingState = () => {
return <div>Loading State</div>
}

return (
<>
<PageHeader>
Expand All @@ -206,18 +208,18 @@ export default function SiloAuditLogsPage() {
gridTemplateColumns: '7rem 4.25rem 180px 120px 120px 120px 300px 300px',
}}
>
{['Time', 'Status', 'Operation', 'Actor', 'Access Method', 'Silo', 'Duration'].map(
(header) => (
<div key={header} className="text-mono-sm text-tertiary">
{header}
</div>
)
)}
<HeaderCell>Time</HeaderCell>
<HeaderCell>Status</HeaderCell>
<HeaderCell>Operation</HeaderCell>
<HeaderCell>Actor</HeaderCell>
<HeaderCell>Access Method</HeaderCell>
<HeaderCell>Silo</HeaderCell>
<HeaderCell>Duration</HeaderCell>
</div>

<div className="!mx-0 flex h-full !w-full flex-col">
<div className="w-full flex-1" ref={parentRef}>
{error ? <ErrorState /> : !isLoading ? <LogTable /> : <LoadingState />}
{error ? <ErrorState /> : !isLoading ? logTable : <LoadingState />}
</div>
</div>
</>
Expand Down