Merge remote-tracking branch 'origin/main' into next

This commit is contained in:
github-actions[bot] 2026-08-19 09:09:28 +00:00
commit ba933ac8a0
6 changed files with 35 additions and 9 deletions

View file

@ -70,6 +70,7 @@
'icon' => 'shield-star',
'group' => 'Platform',
'visible' => $server->isFunctional() && ! $server->isSwarm() && ! $server->settings->is_build_server && auth()->user()?->can('viewSentinel', $server),
'warning' => $server->isSentinelEnabled() && ! $server->isSentinelLive(),
'children' => [
['label' => 'Configuration', 'route' => 'server.sentinel', 'active' => request()->routeIs('server.sentinel'), 'icon' => 'settings'],
['label' => 'Logs', 'route' => 'server.sentinel.logs', 'active' => request()->routeIs('server.sentinel.logs'), 'icon' => 'file-content'],

View file

@ -6,7 +6,10 @@
@php
$serverReady = $server->isFunctional();
$proxyNeedsAttention = $server->proxySet() && ! in_array($proxyStatus, ['running'], true);
$proxyUpdateAvailable = $server->proxySet()
&& ($server->hasCurrentTraefikOutdatedInfo() || $server->hasPendingProxyConfiguration());
$proxyNeedsAttention = $server->proxySet()
&& (! in_array($proxyStatus, ['running'], true) || $proxyUpdateAvailable);
$sentinelNeedsAttention = $showSentinelStatus && ! $server->isSentinelLive();
[$summaryLabel, $summaryType] = match (true) {
@ -58,9 +61,9 @@ class="inline-flex size-5 items-center justify-center rounded text-neutral-400 h
class="listbox-option gap-2.5!" @click="open = false" role="menuitem">
<span @class([
'size-1.5 shrink-0 rounded-full',
'bg-success' => $proxyStatus === 'running',
'bg-warning' => in_array($proxyStatus, ['starting', 'restarting', 'stopping'], true),
'bg-error' => ! in_array($proxyStatus, ['running', 'starting', 'restarting', 'stopping'], true),
'bg-success' => $proxyStatus === 'running' && ! $proxyUpdateAvailable,
'bg-warning' => $proxyNeedsAttention && ($proxyUpdateAvailable || in_array($proxyStatus, ['starting', 'restarting', 'stopping'], true)),
'bg-error' => $proxyNeedsAttention && ! $proxyUpdateAvailable && ! in_array($proxyStatus, ['starting', 'restarting', 'stopping'], true),
])></span>
<span class="flex-1">Proxy</span>
<span>{{ str($proxyStatus ?: 'unknown')->headline() }}</span>
@ -69,7 +72,11 @@ class="listbox-option gap-2.5!" @click="open = false" role="menuitem">
@if ($showSentinelStatus)
<a href="{{ route('server.sentinel', ['server_uuid' => $server->uuid]) }}" {{ wireNavigate() }}
class="listbox-option gap-2.5!" @click="open = false" role="menuitem">
<span class="size-1.5 shrink-0 rounded-full {{ $server->isSentinelLive() ? 'bg-success' : 'bg-error' }}"></span>
<span @class([
'size-1.5 shrink-0 rounded-full',
'bg-success' => ! $sentinelNeedsAttention,
'bg-warning' => $sentinelNeedsAttention,
])></span>
<span class="flex-1">Sentinel</span>
<span>{{ $server->isSentinelLive() ? 'In sync' : 'Out of sync' }}</span>
</a>

View file

@ -175,7 +175,7 @@ class="button button-highlighted">
<div class="grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4">
@foreach ($dashboardServers as $server)
@php
$proxyNeedsAttention = $server->proxySet() && $server->proxy->status !== 'running';
$proxyNeedsAttention = $server->proxySet() && ($server->proxy->status !== 'running' || $server->hasCurrentTraefikOutdatedInfo());
$sentinelNeedsAttention = $server->isSentinelEnabled() && ! $server->isSentinelLive();
[$serverStatus, $serverStatusType] = match (true) {

View file

@ -33,7 +33,8 @@ class="button w-fit shrink-0 whitespace-nowrap button-highlighted">
&& $server->settings->is_usable
&& ! $server->settings->force_disabled
&& ! $isTransferredAway;
$proxyNeedsAttention = $isReady && $server->proxySet() && $server->proxy->status !== 'running';
$proxyNeedsAttention = $isReady && $server->proxySet()
&& ($server->proxy->status !== 'running' || $server->hasCurrentTraefikOutdatedInfo());
$sentinelNeedsAttention = $isReady && $server->isSentinelEnabled() && ! $server->isSentinelLive();
$status = match (true) {

View file

@ -36,6 +36,13 @@
->toMatch("/'label' => 'Sentinel',\s*'route' => 'server\.sentinel',\s*'active' => request\(\)->routeIs\('server\.sentinel', 'server\.sentinel\.\*'\),\s*'icon' => 'shield-star'/s");
});
it('shows a warning icon when sentinel is enabled but not working', function () {
$contents = file_get_contents(resource_path('views/components/server/sidebar.blade.php'));
expect($contents)
->toContain("'warning' => \$server->isSentinelEnabled() && ! \$server->isSentinelLive()");
});
it('uses the network reicon for proxy in the server sidebar', function () {
$contents = file_get_contents(resource_path('views/components/server/sidebar.blade.php'));

View file

@ -13,7 +13,7 @@
expect(substr_count($serverIndex, '<x-status-badge'))->toBe(1)
->and($serverIndex)
->toContain("\$proxyNeedsAttention = \$isReady && \$server->proxySet() && \$server->proxy->status !== 'running'")
->toContain("&& (\$server->proxy->status !== 'running' || \$server->hasCurrentTraefikOutdatedInfo())")
->toContain('$sentinelNeedsAttention = $isReady && $server->isSentinelEnabled() && ! $server->isSentinelLive()')
->toContain("\$proxyNeedsAttention || \$sentinelNeedsAttention => 'warning'")
->toContain("\$isReady => 'success'")
@ -29,11 +29,21 @@
$dashboard = file_get_contents(resource_path('views/livewire/dashboard.blade.php'));
expect($dashboard)
->toContain("\$proxyNeedsAttention = \$server->proxySet() && \$server->proxy->status !== 'running'")
->toContain("\$proxyNeedsAttention = \$server->proxySet() && (\$server->proxy->status !== 'running' || \$server->hasCurrentTraefikOutdatedInfo())")
->toContain('$sentinelNeedsAttention = $server->isSentinelEnabled() && ! $server->isSentinelLive()')
->toContain("\$proxyNeedsAttention || \$sentinelNeedsAttention => ['Attention required', 'warning']");
});
test('server status summary uses warning indicators for proxy updates and sentinel outages', function () {
$summary = file_get_contents(resource_path('views/components/server/status-summary.blade.php'));
expect($summary)
->toContain('$server->hasCurrentTraefikOutdatedInfo()')
->toContain("'bg-warning' => \$proxyNeedsAttention && (\$proxyUpdateAvailable")
->toContain("'bg-warning' => \$sentinelNeedsAttention")
->not->toContain("\$server->isSentinelLive() ? 'bg-success' : 'bg-error'");
});
test('server table keeps status text without a badge', function () {
$serverIndex = file_get_contents(resource_path('views/livewire/server/index.blade.php'));