74 lines
3.5 KiB
PHP
74 lines
3.5 KiB
PHP
<div class="space-y-4">
|
|
{{-- Header --}}
|
|
<div class="flex flex-wrap items-end justify-between gap-3">
|
|
<div>
|
|
<p class="font-mono text-[11px] uppercase tracking-[0.2em] text-accent-text">Sicherheit</p>
|
|
<h2 class="mt-0.5 font-display text-xl font-semibold text-ink sm:text-2xl">Audit-Log</h2>
|
|
</div>
|
|
<x-status-pill status="online">{{ $events->count() }} Ereignisse</x-status-pill>
|
|
</div>
|
|
|
|
{{-- Ereignisliste --}}
|
|
<x-panel title="Ereignisse" subtitle="letzte 50 · neueste zuerst" :padded="false">
|
|
<x-slot:actions>
|
|
<label class="relative block">
|
|
<span class="sr-only">Audit-Log durchsuchen</span>
|
|
<span class="pointer-events-none absolute inset-y-0 left-2.5 flex items-center text-ink-4">
|
|
<x-icon name="search" class="h-3.5 w-3.5" />
|
|
</span>
|
|
<input
|
|
type="search"
|
|
wire:model.live.debounce.300ms="q"
|
|
placeholder="Akteur, Aktion, Ziel …"
|
|
class="min-h-11 w-44 rounded-md border border-line bg-inset py-1.5 pl-8 pr-3 font-mono text-xs text-ink placeholder:text-ink-4 focus:border-accent/40 focus:outline-none sm:w-64"
|
|
/>
|
|
</label>
|
|
</x-slot:actions>
|
|
|
|
<div class="divide-y divide-line">
|
|
@forelse ($events as $e)
|
|
<div class="flex items-start gap-3 px-4 py-3 sm:px-5">
|
|
<span class="mt-0.5 grid h-7 w-7 shrink-0 place-items-center rounded-sm bg-raised text-ink-3">
|
|
<x-icon name="audit" class="h-3.5 w-3.5" />
|
|
</span>
|
|
|
|
<div class="min-w-0 flex-1">
|
|
<p class="text-sm text-ink">
|
|
<span class="text-ink-2">{{ $e->actor }}</span> · {{ $e->action }}
|
|
</p>
|
|
@if ($e->target)
|
|
<p class="truncate font-mono text-[11px] text-ink-3">{{ $e->target }}</p>
|
|
@endif
|
|
@if ($e->server)
|
|
<div class="mt-1.5">
|
|
<x-badge tone="accent">
|
|
<x-icon name="server" class="h-3 w-3" />
|
|
{{ $e->server->name }}
|
|
</x-badge>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<span class="shrink-0 whitespace-nowrap font-mono text-[11px] text-ink-4">
|
|
{{ $e->created_at->diffForHumans() }}
|
|
</span>
|
|
</div>
|
|
@empty
|
|
<div class="flex flex-col items-center gap-2 px-4 py-12 text-center sm:px-5">
|
|
<span class="grid h-10 w-10 place-items-center rounded-md bg-raised text-ink-4">
|
|
<x-icon name="audit" class="h-5 w-5" />
|
|
</span>
|
|
<p class="font-display text-sm font-semibold text-ink-2">Keine Ereignisse</p>
|
|
<p class="max-w-xs text-[11px] text-ink-4">
|
|
@if (trim($q) !== '')
|
|
Für „{{ $q }}“ wurden keine Audit-Einträge gefunden.
|
|
@else
|
|
Es liegen noch keine Audit-Einträge vor.
|
|
@endif
|
|
</p>
|
|
</div>
|
|
@endforelse
|
|
</div>
|
|
</x-panel>
|
|
</div>
|