Skip to content

Commit accfe37

Browse files
committed
move audit log to a system page
1 parent 9d46415 commit accfe37

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

app/layouts/SiloLayout.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
Access16Icon,
1313
Folder16Icon,
1414
Images16Icon,
15-
Logs16Icon,
1615
Metrics16Icon,
1716
} from '@oxide/design-system/icons/react'
1817

@@ -38,7 +37,6 @@ export default function SiloLayout() {
3837
{ value: 'Images', path: pb.siloImages() },
3938
{ value: 'Utilization', path: pb.siloUtilization() },
4039
{ value: 'Silo Access', path: pb.siloAccess() },
41-
{ value: 'Audit Logs', path: pb.siloAuditLogs() },
4240
]
4341
// filter out the entry for the path we're currently on
4442
.filter((i) => i.path !== pathname)
@@ -72,9 +70,6 @@ export default function SiloLayout() {
7270
<NavLinkItem to={pb.siloAccess()}>
7371
<Access16Icon /> Silo Access
7472
</NavLinkItem>
75-
<NavLinkItem to={pb.siloAuditLogs()}>
76-
<Logs16Icon /> Audit Logs
77-
</NavLinkItem>
7873
</Sidebar.Nav>
7974
</Sidebar>
8075
<ContentPane />

app/layouts/SystemLayout.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { apiQueryClient } from '@oxide/api'
1212
import {
1313
Cloud16Icon,
1414
IpGlobal16Icon,
15+
Logs16Icon,
1516
Metrics16Icon,
1617
Servers16Icon,
1718
} from '@oxide/design-system/icons/react'
@@ -63,6 +64,7 @@ export default function SystemLayout() {
6364
{ value: 'Utilization', path: pb.systemUtilization() },
6465
{ value: 'Inventory', path: pb.sledInventory() },
6566
{ value: 'IP Pools', path: pb.ipPools() },
67+
{ value: 'Audit Log', path: pb.auditLog() },
6668
]
6769
// filter out the entry for the path we're currently on
6870
.filter((i) => i.path !== pathname)
@@ -106,6 +108,9 @@ export default function SystemLayout() {
106108
<NavLinkItem to={pb.ipPools()}>
107109
<IpGlobal16Icon /> IP Pools
108110
</NavLinkItem>
111+
<NavLinkItem to={pb.auditLog()}>
112+
<Logs16Icon /> Audit Log
113+
</NavLinkItem>
109114
</Sidebar.Nav>
110115
</Sidebar>
111116
<ContentPane />

app/pages/SiloAuditLogsPage.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const HighlightJSON = memo(({ jsonString }: { jsonString: string }) => {
107107
}
108108
})
109109

110-
export const handle = { crumb: 'Audit Logs' }
110+
export const handle = { crumb: 'Audit Log' }
111111

112112
export default function SiloAuditLogsPage() {
113113
const [expandedItem, setExpandedItem] = useState<string | null>(null)
@@ -298,11 +298,11 @@ export default function SiloAuditLogsPage() {
298298
return (
299299
<>
300300
<PageHeader>
301-
<PageTitle icon={<Logs24Icon />}>Audit Logs</PageTitle>
301+
<PageTitle icon={<Logs24Icon />}>Audit Log</PageTitle>
302302
<DocsPopover
303-
heading="audit logs"
303+
heading="audit log"
304304
icon={<Logs16Icon />}
305-
summary="Audit logs provide a record of all system activities, including user actions, API calls, and system events."
305+
summary="The audit log provides a record of system activities, including user actions, API calls, and system events."
306306
links={[docLinks.auditLogs]}
307307
/>
308308
</PageHeader>

app/routes.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ export const routes = createRoutesFromElements(
209209
/>
210210
</Route>
211211
</Route>
212+
<Route
213+
path="audit-log"
214+
lazy={() => import('./pages/SiloAuditLogsPage').then(convert)}
215+
/>
212216
</Route>
213217

214218
<Route index loader={() => redirect(pb.projects())} element={null} />
@@ -252,10 +256,6 @@ export const routes = createRoutesFromElements(
252256
</Route>
253257

254258
<Route path="access" lazy={() => import('./pages/SiloAccessPage').then(convert)} />
255-
<Route
256-
path="audit-logs"
257-
lazy={() => import('./pages/SiloAuditLogsPage').then(convert)}
258-
/>
259259
</Route>
260260

261261
{/* PROJECT */}

app/util/path-builder.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ export const pb = {
107107
siloAccess: () => '/access',
108108
siloImages: () => '/images',
109109
siloImageEdit: (params: PP.SiloImage) => `${pb.siloImages()}/${params.image}/edit`,
110-
siloAuditLogs: () => '/audit-logs',
111110

112111
systemUtilization: () => '/system/utilization',
113112

@@ -129,6 +128,8 @@ export const pb = {
129128
samlIdp: (params: PP.IdentityProvider) =>
130129
`${pb.silo(params)}/idps/saml/${params.provider}`,
131130

131+
auditLog: () => '/system/audit-log',
132+
132133
profile: () => '/settings/profile',
133134
sshKeys: () => '/settings/ssh-keys',
134135
sshKeysNew: () => '/settings/ssh-keys-new',

0 commit comments

Comments
 (0)