diff --git a/app/Actions/Server/UpdateCoolify.php b/app/Actions/Server/UpdateCoolify.php index c74072068..ac548a951 100644 --- a/app/Actions/Server/UpdateCoolify.php +++ b/app/Actions/Server/UpdateCoolify.php @@ -27,10 +27,10 @@ class UpdateCoolify CleanupDocker::run($this->server, false); $this->latestVersion = get_latest_version_of_coolify(); $this->currentVersion = config('version'); - if ($settings->next_channel) { - ray('next channel enabled'); - $this->latestVersion = 'next'; - } + // if ($settings->next_channel) { + // ray('next channel enabled'); + // $this->latestVersion = 'next'; + // } if ($force) { $this->update(); } else { diff --git a/app/Livewire/Settings/Configuration.php b/app/Livewire/Settings/Configuration.php index 5281a1e01..54dbe1bdb 100644 --- a/app/Livewire/Settings/Configuration.php +++ b/app/Livewire/Settings/Configuration.php @@ -13,7 +13,7 @@ class Configuration extends Component public bool $is_auto_update_enabled; public bool $is_registration_enabled; public bool $is_dns_validation_enabled; - public bool $next_channel; + // public bool $next_channel; protected string $dynamic_config_path = '/data/coolify/proxy/dynamic'; protected Server $server; @@ -37,7 +37,7 @@ class Configuration extends Component $this->do_not_track = $this->settings->do_not_track; $this->is_auto_update_enabled = $this->settings->is_auto_update_enabled; $this->is_registration_enabled = $this->settings->is_registration_enabled; - $this->next_channel = $this->settings->next_channel; + // $this->next_channel = $this->settings->next_channel; $this->is_dns_validation_enabled = $this->settings->is_dns_validation_enabled; } @@ -47,12 +47,12 @@ class Configuration extends Component $this->settings->is_auto_update_enabled = $this->is_auto_update_enabled; $this->settings->is_registration_enabled = $this->is_registration_enabled; $this->settings->is_dns_validation_enabled = $this->is_dns_validation_enabled; - if ($this->next_channel) { - $this->settings->next_channel = false; - $this->next_channel = false; - } else { - $this->settings->next_channel = $this->next_channel; - } + // if ($this->next_channel) { + // $this->settings->next_channel = false; + // $this->next_channel = false; + // } else { + // $this->settings->next_channel = $this->next_channel; + // } $this->settings->save(); $this->dispatch('success', 'Settings updated!'); } diff --git a/app/Livewire/Upgrade.php b/app/Livewire/Upgrade.php index 96ee76325..6af1e98db 100644 --- a/app/Livewire/Upgrade.php +++ b/app/Livewire/Upgrade.php @@ -3,7 +3,6 @@ namespace App\Livewire; use App\Actions\Server\UpdateCoolify; -use App\Models\InstanceSettings; use Livewire\Component; use DanHarrin\LivewireRateLimiting\WithRateLimiting; @@ -11,6 +10,7 @@ class Upgrade extends Component { use WithRateLimiting; public bool $showProgress = false; + public bool $updateInProgress = false; public bool $isUpgradeAvailable = false; public string $latestVersion = ''; @@ -19,26 +19,20 @@ class Upgrade extends Component $this->latestVersion = get_latest_version_of_coolify(); $currentVersion = config('version'); version_compare($currentVersion, $this->latestVersion, '<') ? $this->isUpgradeAvailable = true : $this->isUpgradeAvailable = false; - if (isDev()) { + // if (isDev()) { $this->isUpgradeAvailable = true; - } - $settings = InstanceSettings::get(); - if ($settings->next_channel) { - $this->isUpgradeAvailable = true; - $this->latestVersion = 'next'; - } + // } } public function upgrade() { try { - if ($this->showProgress) { + if ($this->updateInProgress) { return; } - $this->rateLimit(1, 30); - $this->showProgress = true; + $this->rateLimit(1, 60); + $this->updateInProgress = true; UpdateCoolify::run(force: true, async: true); - $this->dispatch('success', "Updating Coolify to {$this->latestVersion} version..."); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.php index 66fa1bbf3..924625424 100644 --- a/resources/views/components/navbar.blade.php +++ b/resources/views/components/navbar.blade.php @@ -161,10 +161,11 @@ class="{{ request()->is('storages*') ? 'menu-item-active menu-item' : 'menu-item' }}" href="{{ route('storage.index') }}"> S3 Storages @@ -175,9 +176,11 @@ class="{{ request()->is('shared-variables*') ? 'menu-item-active menu-item' : 'menu-item' }}" href="{{ route('shared-variables.index') }}"> Shared Variables @@ -318,9 +321,7 @@
@if (isInstanceAdmin() && !isCloud())Are you sure you would like to upgrade your instance to {{ $latestVersion }}?
+You can review the changelogs here.
+ @if ($showProgress) +