1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-14 18:12:31 +00:00

feat: location filter for global audit log (#662)

This commit is contained in:
Kyle Mendell
2025-06-19 12:12:53 -05:00
committed by GitHub
parent 481df3bcb9
commit ac5a121f66
11 changed files with 48 additions and 8 deletions

View File

@@ -18,9 +18,15 @@
let filters: AuditLogFilter = $state({
userId: '',
event: '',
location: '',
clientName: ''
});
const locationTypes = $state({
external: 'External Networks',
internal: 'Internal Networks'
});
const eventTypes = $state({
SIGN_IN: m.sign_in(),
TOKEN_SIGN_IN: m.token_sign_in(),
@@ -47,7 +53,7 @@
>
</Card.Header>
<Card.Content>
<div class="mb-6 grid grid-cols-1 gap-4 md:grid-cols-3">
<div class="mb-6 grid grid-cols-1 gap-4 md:grid-cols-4">
<div>
{#await auditLogService.listUsers()}
<Select.Root type="single">
@@ -82,6 +88,20 @@
bind:value={filters.event}
/>
</div>
<div>
<SearchableSelect
disableSearch={true}
class="w-full"
items={[
{ value: '', label: m.all_locations() },
...Object.entries(locationTypes).map(([value, label]) => ({
value,
label
}))
]}
bind:value={filters.location}
/>
</div>
<div>
{#await auditLogService.listClientNames()}
<Select.Root