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, '<')) {
StartSentinel::run($this->server, $version, true);
return;
}
ray('Sentinel image is up to date');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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