diff --git a/resources/views/livewire/server/security/patches.blade.php b/resources/views/livewire/server/security/patches.blade.php index 30a95ad2b3..e3f440cc65 100644 --- a/resources/views/livewire/server/security/patches.blade.php +++ b/resources/views/livewire/server/security/patches.blade.php @@ -33,66 +33,94 @@
- - - - @if (isDev()) - - Send test email - - @endif - @can('update', $server) - @if ($rebootRequired) - - @endif - - - Check for updates - - @endcan - +
+ -
- - Last checked: - @if ($checkedAt) - {{ $checkedAt->diffForHumans() }} - @else - never + + + + @if (isDev()) + + Send test email + @endif - - @if ($checkedAt && ! $error) - @if ($totalUpdates === 0) - - @else - - @endif - @if ($securityUpdates > 0) - - @endif - @if ($rebootRequired) - - @endif - @endif -
+ @can('update', $server) + @if ($rebootRequired) + + @endif + + + Check for updates + + @endcan + - - Automated package discovery currently supports apk, apt, dnf, pacman, and zypper. Status - notifications can be managed from - notification settings. - - +
+ +
+ + Last checked: + @if ($checkedAt) + {{ $checkedAt->diffForHumans() }} + @else + never + @endif + + @if ($checkedAt && ! $error) + @if ($totalUpdates === 0) + + @else + + @endif + @if ($securityUpdates > 0) + + @endif + @if ($rebootRequired) + + @endif + @endif +
+ + @php + $autoUpdatesSupported = \App\Actions\Server\ConfigureAutomaticSecurityUpdates::supportFor($packageManager); + @endphp +
$autoUpdatesSupported])> + + @if ($autoUpdatesSupported) + + + @endif +
+ + + Automated package discovery currently supports apk, apt, dnf, pacman, and zypper. Automatic + security updates are available for apt and dnf (Debian, Ubuntu, and RHEL family)@if ($packageManager && ! $autoUpdatesSupported); this server uses {{ $packageManager }}@endif. + Status notifications can be managed from + notification settings. + +
+ + @if ($checking)
@@ -198,43 +226,6 @@ @endif -
- - - - - - - - @if (\App\Actions\Server\ConfigureAutomaticSecurityUpdates::supportFor($packageManager)) -
- - -
- @elseif ($packageManager) - - Automatic security updates are available for Debian, Ubuntu, and RHEL-family servers - (apt and dnf). This server uses {{ $packageManager }}. - - @else - - Coolify needs one successful check to know the package manager of this server. - - @endif -
-
diff --git a/tests/Feature/Server/ServerPatchesTest.php b/tests/Feature/Server/ServerPatchesTest.php index 4e2786cde4..db1b6d18c2 100644 --- a/tests/Feature/Server/ServerPatchesTest.php +++ b/tests/Feature/Server/ServerPatchesTest.php @@ -388,7 +388,7 @@ describe('automatic security updates', function () { ConfigureAutomaticSecurityUpdates::shouldRun()->never(); Livewire::test(Patches::class, ['server_uuid' => $this->server->uuid]) - ->assertSee('This server uses pacman') + ->assertSee('this server uses pacman') ->set('autoSecurityUpdates', true) ->call('submit') ->assertDispatched('error');