From 3c0c7cc93d1b8e8f9aee5c73a43ec9a17718c2fc Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 19 Oct 2026 13:43:31 +0200 Subject: [PATCH] refactor(patches): move schedule and automatic updates into the Server patching section The check frequency, automatic security updates, and maintenance window are now fields of the first section, in one row, instead of two extra boxes. The "not supported" note moved into the existing callout. Co-Authored-By: Claude Opus 5.5 --- .../server/security/patches.blade.php | 179 +++++++++--------- tests/Feature/Server/ServerPatchesTest.php | 2 +- 2 files changed, 86 insertions(+), 95 deletions(-) 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');