## Summary - make `/admin` the canonical workspace-level home instead of implicitly forcing tenant context - add a new Filament workspace overview page with bounded workspace-safe widgets, quick actions, and empty states - align panel routing, middleware, redirect helpers, and tests with the new workspace-home semantics - add Spec 129 design artifacts, contracts, and focused Pest coverage for landing, navigation, content, operations, and authorization ## Validation - `vendor/bin/sail artisan test --compact tests/Feature/Filament/AdminHomeRedirectsToChooseTenantWhenWorkspaceSelectedTest.php tests/Feature/Filament/LoginRedirectsToChooseWorkspaceWhenMultipleWorkspacesTest.php tests/Feature/Filament/WorkspaceOverviewLandingTest.php tests/Feature/Filament/WorkspaceOverviewNavigationTest.php tests/Feature/Filament/WorkspaceOverviewContentTest.php tests/Feature/Filament/WorkspaceOverviewEmptyStatesTest.php tests/Feature/Filament/WorkspaceOverviewOperationsTest.php tests/Feature/Filament/WorkspaceOverviewAuthorizationTest.php tests/Feature/Filament/WorkspaceOverviewPermissionVisibilityTest.php tests/Feature/Filament/ChooseTenantRequiresWorkspaceTest.php tests/Feature/Guards/AdminWorkspaceRoutesGuardTest.php` - `vendor/bin/sail bin pint --dirty --format agent` ## Notes - Livewire v4.0+ compliance is preserved through Filament v5 usage. - Panel provider registration remains in `bootstrap/providers.php` for Laravel 12. - This feature adds a workspace overview page for the admin panel home; it does not introduce destructive actions. - No new Filament assets were added, so there is no additional `filament:assets` deployment requirement for this branch. - Manual browser QA for the quickstart scenarios was not completed in this session because the local browser opened at the Microsoft login flow without an authenticated test session. Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #157
70 lines
3.4 KiB
PHP
70 lines
3.4 KiB
PHP
<x-filament::section heading="Baseline Governance">
|
|
@if ($landingUrl)
|
|
<x-slot name="afterHeader">
|
|
<x-filament::link :href="$landingUrl" size="sm" icon="heroicon-m-arrow-top-right-on-square" icon-position="after">
|
|
Details
|
|
</x-filament::link>
|
|
</x-slot>
|
|
@endif
|
|
|
|
@if (! $hasAssignment)
|
|
<div class="flex items-start gap-3 rounded-lg bg-gray-50 p-4 dark:bg-white/5">
|
|
<x-heroicon-o-link-slash class="mt-0.5 h-5 w-5 shrink-0 text-gray-400 dark:text-gray-500" />
|
|
<div>
|
|
<div class="text-sm font-medium text-gray-950 dark:text-white">No Baseline Assigned</div>
|
|
<div class="mt-0.5 text-sm text-gray-500 dark:text-gray-400">Assign a baseline profile to start monitoring drift.</div>
|
|
</div>
|
|
</div>
|
|
@else
|
|
<div class="flex flex-col gap-3">
|
|
{{-- Profile + last compared --}}
|
|
<div class="flex items-center justify-between text-sm">
|
|
<div class="text-gray-600 dark:text-gray-300">
|
|
Baseline: <span class="font-medium text-gray-950 dark:text-white">{{ $profileName }}</span>
|
|
</div>
|
|
@if ($lastComparedAt)
|
|
<div class="text-gray-500 dark:text-gray-400">{{ $lastComparedAt }}</div>
|
|
@endif
|
|
</div>
|
|
|
|
{{-- Findings summary --}}
|
|
@if ($findingsCount > 0)
|
|
{{-- Critical banner (inline) --}}
|
|
@if ($highCount > 0)
|
|
<div class="flex items-center gap-2 rounded-lg border border-danger-300 bg-danger-50 px-3 py-2 dark:border-danger-700 dark:bg-danger-950/50">
|
|
<x-heroicon-s-exclamation-triangle class="h-4 w-4 shrink-0 text-danger-600 dark:text-danger-400" />
|
|
<span class="text-sm font-medium text-danger-800 dark:text-danger-200">
|
|
{{ $highCount }} high-severity {{ Str::plural('finding', $highCount) }}
|
|
</span>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="flex items-center justify-between">
|
|
<div class="flex flex-wrap items-center gap-2">
|
|
<x-filament::badge color="danger" size="sm">
|
|
{{ $findingsCount }} {{ Str::plural('finding', $findingsCount) }}
|
|
</x-filament::badge>
|
|
|
|
@if ($mediumCount > 0)
|
|
<x-filament::badge color="warning" size="sm">
|
|
{{ $mediumCount }} medium
|
|
</x-filament::badge>
|
|
@endif
|
|
|
|
@if ($lowCount > 0)
|
|
<x-filament::badge color="gray" size="sm">
|
|
{{ $lowCount }} low
|
|
</x-filament::badge>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
@else
|
|
<div class="flex items-center gap-2 rounded-lg bg-success-50 px-3 py-2 dark:bg-success-950/50">
|
|
<x-heroicon-o-check-circle class="h-4 w-4 shrink-0 text-success-600 dark:text-success-400" />
|
|
<span class="text-sm font-medium text-success-700 dark:text-success-300">No open drift — baseline compliant</span>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
</x-filament::section>
|