fix(server): keep resources nav active and show tab loading

Use $activeMenu for Resources so Livewire updates do not clear
the sidebar highlight, and disable managed/unmanaged tabs with
spinners while containers load.
This commit is contained in:
Andras Bacsai
2026-08-07 15:24:41 +02:00
parent 8f7eb2d790
commit 28f57aafb8
4 changed files with 25 additions and 5 deletions
@@ -55,3 +55,13 @@ test('unmanaged container names use the same typeface as managed resource names'
->toContain('min-w-0 truncate text-[12px] font-medium text-neutral-950 dark:text-fg')
->not->toContain('truncate font-mono text-[12px] text-neutral-950 dark:text-fg');
});
test('server resource tabs show a loading state while switching', function () {
$view = file_get_contents(resource_path('views/livewire/server/resources.blade.php'));
expect(substr_count($view, 'wire:loading.attr="disabled" wire:target="loadManagedContainers,loadUnmanagedContainers"'))
->toBe(2)
->and($view)
->toContain('<x-loading-on-button wire:loading wire:target="loadManagedContainers" />')
->toContain('<x-loading-on-button wire:loading wire:target="loadUnmanagedContainers" />');
});