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.

Added info toast to let the user know to restart the app after enabling healthcheck

ShadowArcanistdc2929e1f707
diff --git a/app/Livewire/Project/Shared/HealthChecks.php b/app/Livewire/Project/Shared/HealthChecks.php
index 44f5c5e446..ee11c496d7 100644
--- a/app/Livewire/Project/Shared/HealthChecks.php
+++ b/app/Livewire/Project/Shared/HealthChecks.php
@@ -51,9 +51,15 @@ class HealthChecks extends Component
{
try {
$this->authorize('update', $this->resource);
+ $wasEnabled = $this->resource->health_check_enabled;
$this->resource->health_check_enabled = !$this->resource->health_check_enabled;
$this->resource->save();
- $this->dispatch('success', 'Health check ' . ($this->resource->health_check_enabled ? 'enabled' : 'disabled') . '.');
+
+ if ($this->resource->health_check_enabled && !$wasEnabled && $this->resource->isRunning()) {
+ $this->dispatch('info', 'Health check has been enabled. A restart is required to apply the new settings.');
+ } else {
+ $this->dispatch('success', 'Health check ' . ($this->resource->health_check_enabled ? 'enabled' : 'disabled') . '.');
+ }
} catch (\Throwable $e) {
return handleError($e, $this);
}