-
Notifications
You must be signed in to change notification settings - Fork 22
Audit log #2860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
david-crespo
wants to merge
67
commits into
main
Choose a base branch
from
audit-log
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Audit log #2860
Changes from 51 commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
0c49f07
Use WIP audit log Omicron API
benjaminleonard 91ea5ec
Stub out virtualised audit log page
benjaminleonard 5eb3ec0
Denser inputs
benjaminleonard fdb4506
Re-add missing link
benjaminleonard 35be627
Update API
benjaminleonard 82e58ac
Merge branch 'main' into audit-log
benjaminleonard 8c25eb0
Mock type fixes
benjaminleonard 9d46415
merge main, resolve conflicts, tweak some stuff
david-crespo accfe37
move audit log to a system page
david-crespo 34b7437
fix path and breadcrumbs snapshot tests
david-crespo b19f5d1
merge main, bump api, and fix type errors
david-crespo c6f5d96
take out json stuff and row expansion
david-crespo 09b1df8
don't define components in render
david-crespo 98ccb62
make fewer than 200000 mock audit log entries (fix test failure)
david-crespo 28e9807
rename auditLogs to auditLog everywhere
david-crespo f0ab97b
show user and silo IDs with middle truncation
david-crespo 0018531
put back the expandable JSON thing and fix the height
david-crespo 0f6bde1
request_uri is the full URI
david-crespo f50cc3a
camelToSnakeJson for json body
david-crespo 849e425
make HighlightJSON a normal recursive component
david-crespo 3d1b37a
fix date rendering
david-crespo ea4142a
fix a11y lint error by making rows focusable and interactive
david-crespo fb15493
update API for auth_method -> access_method
david-crespo 07dc1ea
merge main
david-crespo c1dab54
merge main
david-crespo 4703c88
sort by time descending in API call, fix timestamp col width
david-crespo 0455abe
real status code display and remove POST
david-crespo 11f173d
Fix overflow
benjaminleonard 7ff174f
Pane and loading state
benjaminleonard fe7397d
Merge branch 'main' into audit-log
benjaminleonard 42fbfd0
Error state
benjaminleonard 448a525
Error border tweak
benjaminleonard d7e395c
Border edge case fix
benjaminleonard 7d7dcf4
merge main
david-crespo a7b054b
Merge branch 'main' into audit-log
benjaminleonard 9d6b284
Reduce listbox height
benjaminleonard 4957378
Fix virtualiser after scroll change
benjaminleonard 2b6ea95
Keyboard navigate audit log rows
benjaminleonard 351b248
Perf improvements
benjaminleonard 7efaacf
Smaller screen improvements and design tidbits
benjaminleonard cebc838
Add license to `useWindowSize`
benjaminleonard d5e6b05
Improve load more button
benjaminleonard f07b8fe
Make `copyToClipboard` scale less dramatic
benjaminleonard 01a735c
Overlap expanded item over header row also
benjaminleonard 0c80626
Fix syntax highlighting
benjaminleonard 667f7ae
Only scroll to on click not keyboard nav
benjaminleonard deec8eb
Fix gradient on light mode
benjaminleonard 64d360e
Fix selected item header alignment
benjaminleonard 8aa8fe9
Merge branch 'main' into audit-log
benjaminleonard 77a6f64
Use default error bg colour
benjaminleonard 1327267
fix lint: useless default assignment
david-crespo b1d8763
CSS col hiding
benjaminleonard 7e3029e
External CSS is cleaner
benjaminleonard 7464a12
Test long operation
benjaminleonard acf5adf
Fix animation offset
benjaminleonard d3b441d
Wrap date in quotes
benjaminleonard 7763c69
Reuse snakeify fn
benjaminleonard 8927660
Switch div to button
benjaminleonard 0825cb7
Arrow keys to adjust focus without modal
benjaminleonard 201464a
Revert switch to button
benjaminleonard 15d3b1f
Fix guide link
benjaminleonard 7c6e9d1
Use rando
benjaminleonard d18fd4b
Use rando for skeleton rows too
benjaminleonard d50dd52
Fix z-index listbox stacking
benjaminleonard 3c5e35a
Fmt
benjaminleonard 0909707
Correct audit log docs link
benjaminleonard 73e5c82
audit logs -> audit log (there's only one)
david-crespo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| /* | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, you can obtain one at https://mozilla.org/MPL/2.0/. | ||
| * | ||
| * Copyright Oxide Computer Company | ||
| */ | ||
| import { useEffect, useState } from 'react' | ||
|
|
||
| export const useWindowSize = () => { | ||
| const [size, setSize] = useState<{ | ||
| width: number | ||
| height: number | ||
| }>({ | ||
| width: 0, | ||
| height: 0, | ||
| }) | ||
|
|
||
| // Handler to call on window resize | ||
| function handleResize() { | ||
| // Set window width/height to state | ||
| setSize({ | ||
| width: window.innerWidth, | ||
| height: window.innerHeight, | ||
| }) | ||
| } | ||
|
|
||
| useEffect(() => { | ||
| // Only execute all the code below in client side | ||
| if (typeof window !== 'undefined') { | ||
| window.addEventListener('resize', handleResize) | ||
|
|
||
| handleResize() | ||
|
|
||
| return () => window.removeEventListener('resize', handleResize) | ||
| } | ||
| }, []) | ||
|
|
||
| return size | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.