Adds a tenant-scoped dashboard page (KPIs, Needs Attention, Recent Drift Findings, Recent Operations) with polling only while active runs exist. Guardrails: DB-only render (no outbound HTTP) + tenant isolation. Tests: ActiveRunsTest, TenantDashboardDbOnlyTest, TenantDashboardTenantScopeTest. Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.local> Reviewed-on: #68
38 lines
1.6 KiB
PHP
38 lines
1.6 KiB
PHP
<div
|
|
@if ($pollingInterval)
|
|
wire:poll.{{ $pollingInterval }}
|
|
@endif
|
|
class="rounded-xl bg-white p-6 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10"
|
|
>
|
|
<div class="flex items-center justify-between">
|
|
<div class="text-base font-semibold text-gray-950 dark:text-white">Recent Operations</div>
|
|
</div>
|
|
|
|
<div class="mt-4">
|
|
@if ($runs->isEmpty())
|
|
<div class="text-sm text-gray-600 dark:text-gray-300">No operations yet.</div>
|
|
@else
|
|
<div class="flex flex-col gap-2">
|
|
@foreach ($runs as $run)
|
|
<a
|
|
href="{{ $run->getAttribute('view_url') }}"
|
|
class="rounded-lg border border-gray-200 p-3 transition hover:bg-gray-50 dark:border-white/10 dark:hover:bg-white/5"
|
|
>
|
|
<div class="flex items-center justify-between gap-3">
|
|
<div class="text-sm font-medium text-gray-950 dark:text-white">
|
|
{{ $run->getAttribute('type_label') ?? $run->type }}
|
|
</div>
|
|
<div class="text-xs text-gray-500 dark:text-gray-400">
|
|
{{ $run->created_at?->diffForHumans() }}
|
|
</div>
|
|
</div>
|
|
<div class="mt-1 text-sm text-gray-600 dark:text-gray-300">
|
|
Status: {{ $run->status }} · Outcome: {{ $run->outcome }}
|
|
</div>
|
|
</a>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|