mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-15 17:22:34 -04:00
38 lines
972 B
PHP
38 lines
972 B
PHP
<?php
|
|
|
|
namespace App\Livewire\Project\Database;
|
|
|
|
use Illuminate\Contracts\View\View;
|
|
use Livewire\Component;
|
|
|
|
class Status extends Component
|
|
{
|
|
public $database;
|
|
|
|
public function getListeners(): array
|
|
{
|
|
$teamId = auth()->user()->currentTeam()->id;
|
|
|
|
return [
|
|
"echo-private:team.{$teamId},ServiceStatusChanged" => 'refreshStatus',
|
|
"echo-private:team.{$teamId},ServiceChecked" => 'refreshStatus',
|
|
];
|
|
}
|
|
|
|
public function refreshStatus(): void
|
|
{
|
|
$this->database->refresh();
|
|
}
|
|
|
|
public function render(): View
|
|
{
|
|
return view('livewire.project.database.status', [
|
|
'healthcheckUrl' => route('project.database.healthcheck', [
|
|
'project_uuid' => $this->database->environment->project->uuid,
|
|
'environment_uuid' => $this->database->environment->uuid,
|
|
'database_uuid' => $this->database->uuid,
|
|
]),
|
|
]);
|
|
}
|
|
}
|