diff --git a/app/Livewire/Server/Form.php b/app/Livewire/Server/Form.php index 335b17396..82d9f5d8e 100644 --- a/app/Livewire/Server/Form.php +++ b/app/Livewire/Server/Form.php @@ -178,6 +178,19 @@ class Form extends Component } } + public function saveSentinel() + { + try { + $this->validate(); + $this->server->settings->save(); + $this->dispatch('success', 'Sentinel updated.'); + } catch (\Throwable $e) { + return handleError($e, $this); + } finally { + $this->checkSyncStatus(); + } + } + public function restartSentinel($notification = true) { try { @@ -185,7 +198,8 @@ class Form extends Component $this->validate([ 'server.settings.sentinel_custom_url' => 'required|url', ]); - $this->server->restartSentinel(); + $this->server->settings->save(); + $this->server->restartSentinel(async: false); if ($notification) { $this->dispatch('success', 'Sentinel restarted.'); } diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index d658be125..7ae9df749 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -173,9 +173,6 @@ function get_latest_sentinel_version(): string return data_get($versions, 'coolify.sentinel.version'); } catch (\Throwable $e) { - //throw $e; - ray($e->getMessage()); - return '0.0.0'; } } @@ -362,10 +359,6 @@ function isCloud(): bool return ! config('coolify.self_hosted'); } -function isExperimentalFeaturesEnabled(): bool -{ - return config('coolify.is_experimental_features_enabled'); -} function translate_cron_expression($expression_to_validate): string { if (isset(VALID_CRON_STRINGS[$expression_to_validate])) { diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.php index 3f3361124..35ec6c71b 100644 --- a/resources/views/livewire/server/form.blade.php +++ b/resources/views/livewire/server/form.blade.php @@ -158,68 +158,63 @@ @endif - @if (!$server->isSwarm() && !$server->isBuildServer()) - @if (isExperimentalFeaturesEnabled()) -