This commit is contained in:
Andras Bacsai
2023-11-05 09:49:23 +01:00
parent 0a5a101ef4
commit 6f673d7a07
6 changed files with 10 additions and 8 deletions

View File

@@ -13,7 +13,7 @@ class Index extends Component
public $databases;
public array $parameters;
public array $query;
protected $listeners = ["refreshStacks"];
protected $listeners = ["refreshStacks", "checkStatus"];
public function render()
{
return view('livewire.project.service.index');

View File

@@ -4,7 +4,6 @@ namespace App\Http\Livewire\Project\Service;
use App\Actions\Service\StartService;
use App\Actions\Service\StopService;
use App\Jobs\ContainerStatusJob;
use App\Models\Service;
use Livewire\Component;
@@ -13,12 +12,15 @@ class Navbar extends Component
public Service $service;
public array $parameters;
public array $query;
protected $listeners = ["checkStatus"];
public function render()
{
return view('livewire.project.service.navbar');
}
public function checkStatus() {
$this->service->refresh();
}
public function deploy()
{
$this->service->parse();
@@ -30,6 +32,6 @@ class Navbar extends Component
StopService::run($this->service);
$this->service->refresh();
$this->emit('success', 'Service stopped successfully.');
$this->checkStatus();
$this->emit('checkStatus');
}
}