From b1d2914c08e5aefe71e71fd44ce14de7efb7ebe8 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 24 Oct 2024 22:00:26 +0200 Subject: [PATCH] Refactor function and configuration names for experimental features --- app/Actions/Server/StartSentinel.php | 2 +- bootstrap/helpers/shared.php | 4 ++-- config/coolify.php | 2 +- docker-compose.prod.yml | 1 + resources/views/livewire/server/form.blade.php | 4 ++-- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/Actions/Server/StartSentinel.php b/app/Actions/Server/StartSentinel.php index ad5d4cdb2..a8ef8b1fe 100644 --- a/app/Actions/Server/StartSentinel.php +++ b/app/Actions/Server/StartSentinel.php @@ -12,7 +12,7 @@ class StartSentinel public function handle(Server $server, bool $restart = false) { // TODO: Sentinel is not available in this version (soon). - if (! isExperimentalEnabled()) { + if (! isExperimentalFeaturesEnabled()) { return; } $version = get_latest_sentinel_version(); diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 99b7b4c6f..a92b682d7 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -362,9 +362,9 @@ function isCloud(): bool return ! config('coolify.self_hosted'); } -function isExperimentalEnabled(): bool +function isExperimentalFeaturesEnabled(): bool { - return config('coolify.is_experimental_enabled'); + return config('coolify.is_experimental_features_enabled'); } function translate_cron_expression($expression_to_validate): string { diff --git a/config/coolify.php b/config/coolify.php index 0a93d86ea..e81e5ebab 100644 --- a/config/coolify.php +++ b/config/coolify.php @@ -13,5 +13,5 @@ return [ 'helper_image' => env('HELPER_IMAGE', 'ghcr.io/coollabsio/coolify-helper'), 'is_horizon_enabled' => env('HORIZON_ENABLED', true), 'is_scheduler_enabled' => env('SCHEDULER_ENABLED', true), - 'is_experimental_enabled' => env('EXPERIMENTAL_ENABLED', false), + 'is_experimental_features_enabled' => env('EXPERIMENTAL_FEATURES', false), ]; diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index b15a109c3..da300fccc 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -73,6 +73,7 @@ services: - STRIPE_PRICE_ID_ULTIMATE_MONTHLY_OLD - STRIPE_PRICE_ID_ULTIMATE_YEARLY_OLD - STRIPE_EXCLUDED_PLANS + - EXPERIMENTAL_FEATURES ports: - "${APP_PORT:-8000}:80" expose: diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.php index f3293ea0b..3f3361124 100644 --- a/resources/views/livewire/server/form.blade.php +++ b/resources/views/livewire/server/form.blade.php @@ -159,7 +159,7 @@ @if (!$server->isSwarm() && !$server->isBuildServer()) - @if (isExperimentalEnabled()) + @if (isExperimentalFeaturesEnabled())

Sentinel

@if ($server->isSentinelEnabled()) @@ -181,7 +181,7 @@

Sentinel

Sentinel is not available in this version (soon).
@endif - @if (isExperimentalEnabled()) + @if (isExperimentalFeaturesEnabled())