Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(server): distinguish proxy restart and update statuses

Andras Bacsai981163973b4b
diff --git a/resources/views/components/server/status-summary.blade.php b/resources/views/components/server/status-summary.blade.php
index 5e732fade8..8be64a7711 100644
--- a/resources/views/components/server/status-summary.blade.php
+++ b/resources/views/components/server/status-summary.blade.php
@@ -6,10 +6,16 @@
@php
$serverReady = $server->isFunctional();
- $proxyUpdateAvailable = $server->proxySet()
- && ($server->hasCurrentTraefikOutdatedInfo() || $server->hasPendingProxyConfiguration());
+ $proxyConfigurationPending = $server->proxySet() && $server->hasPendingProxyConfiguration();
+ $traefikUpdateAvailable = $server->proxySet() && $server->hasCurrentTraefikOutdatedInfo();
+ $proxyUpdateAvailable = $proxyConfigurationPending || $traefikUpdateAvailable;
$proxyNeedsAttention = $server->proxySet()
&& (! in_array($proxyStatus, ['running'], true) || $proxyUpdateAvailable);
+ $proxyStatusLabel = match (true) {
+ $proxyConfigurationPending => 'Restart required',
+ $traefikUpdateAvailable => 'Update available',
+ default => str($proxyStatus ?: 'unknown')->headline(),
+ };
$sentinelNeedsAttention = $showSentinelStatus && ! $server->isSentinelLive();
[$summaryLabel, $summaryType] = match (true) {
@@ -66,7 +72,7 @@
'bg-error' => $proxyNeedsAttention && ! $proxyUpdateAvailable && ! in_array($proxyStatus, ['starting', 'restarting', 'stopping'], true),
])></span>
<span class="flex-1">Proxy</span>
- <span>{{ str($proxyStatus ?: 'unknown')->headline() }}</span>
+ <span>{{ $proxyStatusLabel }}</span>
</a>
@endif
@if ($showSentinelStatus)
diff --git a/tests/Feature/ServerStatusIndicatorDesignTest.php b/tests/Feature/ServerStatusIndicatorDesignTest.php
index 5e2b8b5faa..4b31a51d85 100644
--- a/tests/Feature/ServerStatusIndicatorDesignTest.php
+++ b/tests/Feature/ServerStatusIndicatorDesignTest.php
@@ -39,6 +39,10 @@ test('server status summary uses warning indicators for proxy updates and sentin
expect($summary)
->toContain('$server->hasCurrentTraefikOutdatedInfo()')
+ ->toContain('$proxyStatusLabel = match (true)')
+ ->toContain("\$proxyConfigurationPending => 'Restart required'")
+ ->toContain("\$traefikUpdateAvailable => 'Update available'")
+ ->toContain('{{ $proxyStatusLabel }}')
->toContain("'bg-warning' => \$proxyNeedsAttention && (\$proxyUpdateAvailable")
->toContain("'bg-warning' => \$sentinelNeedsAttention")
->not->toContain("\$server->isSentinelLive() ? 'bg-success' : 'bg-error'");