## Summary - harden operation-run lifecycle handling with explicit reconciliation policy, stale-run healing, failed-job bridging, and monitoring visibility - refactor audit log event inspection into a Filament slide-over and remove the stale inline detail/header-action coupling - align panel theme asset resolution and supporting Filament UI updates, including the rounded 2xl theme token regression fix ## Testing - ran focused Pest coverage for the affected audit-log inspection flow and related visibility tests - ran formatting with `vendor/bin/sail bin pint --dirty --format agent` - manually verified the updated audit-log slide-over flow in the integrated browser ## Notes - branch includes the Spec 160 artifacts under `specs/160-operation-lifecycle-guarantees/` - the full test suite was not rerun as part of this final commit/PR step Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #190
115 lines
5.9 KiB
PHP
115 lines
5.9 KiB
PHP
@php
|
|
$selectedAudit = $selectedAudit ?? null;
|
|
$selectedAuditLink = $selectedAuditLink ?? null;
|
|
@endphp
|
|
|
|
@if ($selectedAudit)
|
|
<div class="flex flex-col gap-6">
|
|
<div class="flex flex-wrap items-center gap-3">
|
|
<span class="inline-flex items-center rounded-full bg-gray-100 px-3 py-1 text-xs font-medium text-gray-700 dark:bg-gray-800 dark:text-gray-200">
|
|
{{ \App\Support\Badges\BadgeRenderer::label(\App\Support\Badges\BadgeDomain::AuditOutcome)($selectedAudit->normalizedOutcome()->value) }}
|
|
</span>
|
|
<span class="inline-flex items-center rounded-full bg-gray-100 px-3 py-1 text-xs font-medium text-gray-700 dark:bg-gray-800 dark:text-gray-200">
|
|
{{ \App\Support\Badges\BadgeRenderer::label(\App\Support\Badges\BadgeDomain::AuditActorType)($selectedAudit->actorSnapshot()->type->value) }}
|
|
</span>
|
|
|
|
@if (is_array($selectedAuditLink))
|
|
<a
|
|
class="inline-flex items-center rounded-lg border border-gray-300 px-3 py-2 text-sm font-medium text-gray-700 transition hover:bg-gray-50 dark:border-gray-700 dark:text-gray-200 dark:hover:bg-gray-900"
|
|
href="{{ $selectedAuditLink['url'] }}"
|
|
>
|
|
{{ $selectedAuditLink['label'] }}
|
|
</a>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="grid gap-4 lg:grid-cols-3">
|
|
<div class="rounded-2xl border border-gray-200 bg-white p-4 shadow-sm dark:border-gray-800 dark:bg-gray-900">
|
|
<div class="text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400">
|
|
Actor
|
|
</div>
|
|
<div class="mt-2 text-sm font-medium text-gray-900 dark:text-gray-100">
|
|
{{ $selectedAudit->actorDisplayLabel() }}
|
|
</div>
|
|
<div class="mt-1 text-sm text-gray-600 dark:text-gray-300">
|
|
{{ $selectedAudit->actorSnapshot()->type->label() }}
|
|
</div>
|
|
@if ($selectedAudit->actorSnapshot()->email)
|
|
<div class="mt-1 text-xs text-gray-500 dark:text-gray-400">
|
|
{{ $selectedAudit->actorSnapshot()->email }}
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="rounded-2xl border border-gray-200 bg-white p-4 shadow-sm dark:border-gray-800 dark:bg-gray-900">
|
|
<div class="text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400">
|
|
Target
|
|
</div>
|
|
<div class="mt-2 text-sm font-medium text-gray-900 dark:text-gray-100">
|
|
{{ $selectedAudit->targetDisplayLabel() ?? 'No target snapshot' }}
|
|
</div>
|
|
<div class="mt-1 text-sm text-gray-600 dark:text-gray-300">
|
|
{{ $selectedAudit->resource_type ? ucfirst(str_replace('_', ' ', $selectedAudit->resource_type)) : 'Workspace event' }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="rounded-2xl border border-gray-200 bg-white p-4 shadow-sm dark:border-gray-800 dark:bg-gray-900">
|
|
<div class="text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400">
|
|
Scope
|
|
</div>
|
|
<div class="mt-2 text-sm font-medium text-gray-900 dark:text-gray-100">
|
|
{{ $selectedAudit->tenant?->name ?? 'Workspace-wide event' }}
|
|
</div>
|
|
<div class="mt-1 text-sm text-gray-600 dark:text-gray-300">
|
|
Workspace #{{ $selectedAudit->workspace_id }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid gap-4 lg:grid-cols-2">
|
|
<div class="rounded-2xl border border-gray-200 bg-white p-4 shadow-sm dark:border-gray-800 dark:bg-gray-900">
|
|
<div class="text-sm font-semibold text-gray-900 dark:text-gray-100">
|
|
Readable context
|
|
</div>
|
|
|
|
@if ($selectedAudit->contextItems() === [])
|
|
<div class="mt-3 text-sm text-gray-600 dark:text-gray-300">
|
|
No additional context was recorded for this event.
|
|
</div>
|
|
@else
|
|
<dl class="mt-3 space-y-3">
|
|
@foreach ($selectedAudit->contextItems() as $item)
|
|
<div>
|
|
<dt class="text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400">
|
|
{{ $item['label'] }}
|
|
</dt>
|
|
<dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">
|
|
{{ is_bool($item['value']) ? ($item['value'] ? 'true' : 'false') : $item['value'] }}
|
|
</dd>
|
|
</div>
|
|
@endforeach
|
|
</dl>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="rounded-2xl border border-gray-200 bg-white p-4 shadow-sm dark:border-gray-800 dark:bg-gray-900">
|
|
<div class="text-sm font-semibold text-gray-900 dark:text-gray-100">
|
|
Technical metadata
|
|
</div>
|
|
|
|
<dl class="mt-3 space-y-3">
|
|
@foreach ($selectedAudit->technicalMetadata() as $label => $value)
|
|
<div>
|
|
<dt class="text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400">
|
|
{{ $label }}
|
|
</dt>
|
|
<dd class="mt-1 break-all text-sm text-gray-900 dark:text-gray-100">
|
|
{{ $value }}
|
|
</dd>
|
|
</div>
|
|
@endforeach
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endif |