- Canonical /admin/onboarding entry point; legacy routes 404\n- Tenantless run viewer at /admin/operations/{run} with membership-based 404\n- RBAC UX (disabled controls + tooltips) and server-side 403\n- DB-only rendering/refresh; contract registry enforced\n- Adds migrations + tests + spec artifacts
138 lines
6.8 KiB
PHP
138 lines
6.8 KiB
PHP
<x-filament-panels::page>
|
|
@php
|
|
$context = is_array($this->run->context ?? null) ? $this->run->context : [];
|
|
$targetScope = $context['target_scope'] ?? [];
|
|
$targetScope = is_array($targetScope) ? $targetScope : [];
|
|
|
|
$failures = is_array($this->run->failure_summary ?? null) ? $this->run->failure_summary : [];
|
|
@endphp
|
|
|
|
<div class="space-y-6">
|
|
<x-filament::section heading="Summary">
|
|
<div class="grid grid-cols-1 gap-3 text-sm text-gray-700 dark:text-gray-200 md:grid-cols-2">
|
|
<div>
|
|
<span class="text-gray-500 dark:text-gray-400">Run ID:</span>
|
|
<span class="font-medium text-gray-900 dark:text-gray-100">{{ (int) $this->run->getKey() }}</span>
|
|
</div>
|
|
|
|
<div>
|
|
<span class="text-gray-500 dark:text-gray-400">Workspace:</span>
|
|
<span class="font-medium text-gray-900 dark:text-gray-100">{{ (string) ($this->run->workspace?->name ?? '—') }}</span>
|
|
</div>
|
|
|
|
<div>
|
|
<span class="text-gray-500 dark:text-gray-400">Operation:</span>
|
|
<span class="font-medium text-gray-900 dark:text-gray-100">{{ (string) $this->run->type }}</span>
|
|
</div>
|
|
|
|
<div>
|
|
<span class="text-gray-500 dark:text-gray-400">Initiator:</span>
|
|
<span class="font-medium text-gray-900 dark:text-gray-100">{{ (string) $this->run->initiator_name }}</span>
|
|
</div>
|
|
|
|
<div>
|
|
<span class="text-gray-500 dark:text-gray-400">Status:</span>
|
|
<span class="font-medium text-gray-900 dark:text-gray-100">{{ (string) $this->run->status }}</span>
|
|
</div>
|
|
|
|
<div>
|
|
<span class="text-gray-500 dark:text-gray-400">Outcome:</span>
|
|
<span class="font-medium text-gray-900 dark:text-gray-100">{{ (string) $this->run->outcome }}</span>
|
|
</div>
|
|
|
|
<div>
|
|
<span class="text-gray-500 dark:text-gray-400">Started:</span>
|
|
<span class="font-medium text-gray-900 dark:text-gray-100">{{ $this->run->started_at?->format('Y-m-d H:i') ?? '—' }}</span>
|
|
</div>
|
|
|
|
<div>
|
|
<span class="text-gray-500 dark:text-gray-400">Completed:</span>
|
|
<span class="font-medium text-gray-900 dark:text-gray-100">{{ $this->run->completed_at?->format('Y-m-d H:i') ?? '—' }}</span>
|
|
</div>
|
|
</div>
|
|
</x-filament::section>
|
|
|
|
<x-filament::section heading="Target scope" :collapsed="false">
|
|
@php
|
|
$entraTenantId = $targetScope['entra_tenant_id'] ?? null;
|
|
$entraTenantName = $targetScope['entra_tenant_name'] ?? null;
|
|
|
|
$entraTenantId = is_string($entraTenantId) && $entraTenantId !== '' ? $entraTenantId : null;
|
|
$entraTenantName = is_string($entraTenantName) && $entraTenantName !== '' ? $entraTenantName : null;
|
|
@endphp
|
|
|
|
@if ($entraTenantId === null && $entraTenantName === null)
|
|
<div class="text-sm text-gray-600 dark:text-gray-300">
|
|
No target scope details were recorded for this run.
|
|
</div>
|
|
@else
|
|
<div class="flex flex-col gap-2 text-sm text-gray-700 dark:text-gray-200">
|
|
@if ($entraTenantName !== null)
|
|
<div>
|
|
<span class="text-gray-500 dark:text-gray-400">Entra tenant:</span>
|
|
<span class="font-medium text-gray-900 dark:text-gray-100">{{ $entraTenantName }}</span>
|
|
</div>
|
|
@endif
|
|
|
|
@if ($entraTenantId !== null)
|
|
<div>
|
|
<span class="text-gray-500 dark:text-gray-400">Entra tenant ID:</span>
|
|
<span class="font-medium text-gray-900 dark:text-gray-100">{{ $entraTenantId }}</span>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
</x-filament::section>
|
|
|
|
<x-filament::section heading="Report">
|
|
@if ((string) $this->run->status !== 'completed')
|
|
<div class="text-sm text-gray-600 dark:text-gray-300">
|
|
Report unavailable while the run is in progress. Use “Refresh” to re-check stored status.
|
|
</div>
|
|
@elseif ((string) $this->run->outcome === 'succeeded')
|
|
<div class="text-sm text-gray-700 dark:text-gray-200">
|
|
No failures were reported.
|
|
</div>
|
|
@elseif ($failures === [])
|
|
<div class="text-sm text-gray-600 dark:text-gray-300">
|
|
Report unavailable. The run completed, but no failure details were recorded.
|
|
</div>
|
|
@else
|
|
<div class="space-y-3">
|
|
<div class="text-sm font-medium text-gray-900 dark:text-white">
|
|
Findings
|
|
</div>
|
|
|
|
<ul class="space-y-2 text-sm text-gray-700 dark:text-gray-200">
|
|
@foreach ($failures as $failure)
|
|
@php
|
|
$reasonCode = is_array($failure) ? ($failure['reason_code'] ?? null) : null;
|
|
$message = is_array($failure) ? ($failure['message'] ?? null) : null;
|
|
|
|
$reasonCode = is_string($reasonCode) && $reasonCode !== '' ? $reasonCode : null;
|
|
$message = is_string($message) && $message !== '' ? $message : null;
|
|
@endphp
|
|
|
|
@if ($reasonCode !== null || $message !== null)
|
|
<li class="rounded-lg border border-gray-200 bg-white p-3 dark:border-gray-800 dark:bg-gray-900">
|
|
@if ($reasonCode !== null)
|
|
<div class="text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400">
|
|
{{ $reasonCode }}
|
|
</div>
|
|
@endif
|
|
@if ($message !== null)
|
|
<div class="mt-1 text-sm text-gray-700 dark:text-gray-200">
|
|
{{ $message }}
|
|
</div>
|
|
@endif
|
|
</li>
|
|
@endif
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|
|
</x-filament::section>
|
|
</div>
|
|
</x-filament-panels::page>
|
|
|