Fix styling

This commit is contained in:
andrasbacsai 2024-06-18 14:43:18 +00:00 committed by github-actions[bot]
parent 23ed697b98
commit ce15f8f1dd
8 changed files with 39 additions and 27 deletions

View File

@ -47,6 +47,7 @@ class PullSentinelImageJob implements ShouldBeEncrypted, ShouldQueue
} }
if (version_compare($local_version, $version, '<')) { if (version_compare($local_version, $version, '<')) {
StartSentinel::run($this->server, $version, true); StartSentinel::run($this->server, $version, true);
return; return;
} }
ray('Sentinel image is up to date'); ray('Sentinel image is up to date');

View File

@ -41,6 +41,7 @@ class ServerCpu extends Component
return handleError($e, $this); return handleError($e, $this);
} }
} }
public function setInterval() public function setInterval()
{ {
$this->loadData(); $this->loadData();

View File

@ -14,12 +14,14 @@ class ServerMemory extends Component
public $data; public $data;
public $categories; public $categories;
public $interval = 5; public $interval = 5;
public function render() public function render()
{ {
return view('livewire.charts.server-memory'); return view('livewire.charts.server-memory');
} }
public function mount() public function mount()
{ {
$this->loadData(); $this->loadData();
@ -39,7 +41,9 @@ class ServerMemory extends Component
return handleError($e, $this); return handleError($e, $this);
} }
} }
public function setInterval() {
public function setInterval()
{
$this->loadData(); $this->loadData();
} }
} }

View File

@ -104,7 +104,9 @@ class Form extends Component
return handleError($e, $this); return handleError($e, $this);
} }
} }
public function restartSentinel() {
public function restartSentinel()
{
try { try {
$version = get_latest_sentinel_version(); $version = get_latest_sentinel_version();
StartSentinel::run($this->server, $version, true); StartSentinel::run($this->server, $version, true);

View File

@ -466,6 +466,7 @@ $schema://$host {
{ {
return $this->settings->is_metrics_enabled; return $this->settings->is_metrics_enabled;
} }
public function checkSentinel() public function checkSentinel()
{ {
ray("Checking sentinel on server: {$this->name}"); ray("Checking sentinel on server: {$this->name}");
@ -507,6 +508,7 @@ $schema://$host {
return $parsedCollection; return $parsedCollection;
} }
} }
public function getMemoryMetrics(int $mins = 5) public function getMemoryMetrics(int $mins = 5)
{ {
if ($this->isMetricsEnabled()) { if ($this->isMetricsEnabled()) {

View File

@ -163,6 +163,7 @@ function get_latest_sentinel_version(): string
try { try {
$response = Http::get('https://cdn.coollabs.io/coolify/versions.json'); $response = Http::get('https://cdn.coollabs.io/coolify/versions.json');
$versions = $response->json(); $versions = $response->json();
return data_get($versions, 'coolify.sentinel.version'); return data_get($versions, 'coolify.sentinel.version');
} catch (\Throwable $e) { } catch (\Throwable $e) {
//throw $e; //throw $e;
@ -2285,7 +2286,9 @@ function isAnyDeploymentInprogress()
exit(0); exit(0);
} }
function generateSentinelToken() { function generateSentinelToken()
{
$token = Str::random(64); $token = Str::random(64);
return $token; return $token;
} }

View File

@ -1,6 +1,5 @@
<?php <?php
use App\Models\Server;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;