diff --git a/app/Livewire/Shell/FleetStatus.php b/app/Livewire/Shell/FleetStatus.php new file mode 100644 index 0000000..9441337 --- /dev/null +++ b/app/Livewire/Shell/FleetStatus.php @@ -0,0 +1,21 @@ + Server::where('status', 'online')->count(), + 'total' => Server::count(), + ]); + } +} diff --git a/resources/views/components/topbar.blade.php b/resources/views/components/topbar.blade.php index 87898ef..6ef71d4 100644 --- a/resources/views/components/topbar.blade.php +++ b/resources/views/components/topbar.blade.php @@ -22,10 +22,7 @@ {{ __('shell.shortcut_ctrl_k') }} - @php - $fleetTotal = \App\Models\Server::count(); - $fleetOnline = \App\Models\Server::where('status', 'online')->count(); - @endphp - {{ __('shell.fleet_online', ['online' => $fleetOnline, 'total' => $fleetTotal]) }} + {{-- Live-polled island so the online count updates when a server goes up/down (not just on nav). --}} + diff --git a/resources/views/livewire/alerts/index.blade.php b/resources/views/livewire/alerts/index.blade.php index 4a0e4cb..568a7c3 100644 --- a/resources/views/livewire/alerts/index.blade.php +++ b/resources/views/livewire/alerts/index.blade.php @@ -10,7 +10,8 @@ }; @endphp -
{{ __('alerts.eyebrow') }}