Skip to content

Commit a85066c

Browse files
committed
fix: disable sentinel until a few bugs are fixed
1 parent b08d38f commit a85066c

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

app/Console/Commands/Init.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Console\Commands;
44

5+
use App\Actions\Server\StopSentinel;
56
use App\Enums\ApplicationDeploymentStatus;
67
use App\Jobs\CleanupHelperContainersJob;
78
use App\Models\ApplicationDeploymentQueue;
@@ -23,6 +24,16 @@ public function handle()
2324
{
2425
$this->alive();
2526
get_public_ips();
27+
if (version_compare('4.0.0-beta.312', config('version'), '<=')) {
28+
$servers = Server::all();
29+
foreach ($servers as $server) {
30+
$server->settings->update(['is_metrics_enabled' => false]);
31+
if ($server->isFunctional()) {
32+
StopSentinel::dispatch($server);
33+
}
34+
}
35+
}
36+
2637
$full_cleanup = $this->option('full-cleanup');
2738
$cleanup_deployments = $this->option('cleanup-deployments');
2839

resources/views/livewire/server/form.blade.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,13 @@ class="w-full mt-8 mb-4 font-bold box-without-bg bg-coollabs hover:bg-coollabs-1
146146
</div>
147147
<div class="flex items-center gap-2 pt-4 pb-2">
148148
<h3>Sentinel</h3>
149-
@if ($server->isSentinelEnabled())
150-
<x-forms.button wire:click='restartSentinel'>Restart</x-forms.button>
151-
@endif
149+
{{-- @if ($server->isSentinelEnabled()) --}}
150+
{{-- <x-forms.button wire:click='restartSentinel'>Restart</x-forms.button> --}}
151+
{{-- @endif --}}
152152
</div>
153-
<div class="w-64">
153+
<div>Metrics are disabled until a few bugs are fixed.</div>
154+
{{-- <div class="w-64">
154155
<x-forms.checkbox instantSave id="server.settings.is_metrics_enabled" label="Enable Metrics" />
155-
{{-- <x-forms.checkbox instantSave id="server.settings.is_server_api_enabled" label="Enable Server API"
156-
helper="You need to open port 12172 on your firewall. This API will be used to gather data from your server, which makes Coolify a lot faster than relying on SSH connections." />
157-
<x-forms.button wire:click='checkPortForServerApi'>Check Port for Server API</x-forms.button> --}}
158156
</div>
159157
<div class="pt-4">
160158
<div class="flex flex-wrap gap-2 sm:flex-nowrap">
@@ -166,7 +164,7 @@ class="w-full mt-8 mb-4 font-bold box-without-bg bg-coollabs hover:bg-coollabs-1
166164
<x-forms.input id="server.settings.metrics_history_days" label="Metrics history (days)" required
167165
helper="How many days should the metrics data should be reserved." />
168166
</div>
169-
</div>
167+
</div> --}}
170168
@endif
171169
</form>
172170
</div>

0 commit comments

Comments
 (0)