This commit is contained in:
Andras Bacsai
2023-07-28 21:36:19 +02:00
parent 469e404725
commit b57b4f9bd3
9 changed files with 32 additions and 40 deletions

View File

@@ -9,20 +9,12 @@ use Livewire\Component;
class Status extends Component
{
public Server $server;
protected $listeners = ['proxyStatusUpdated'];
public function proxyStatusUpdated()
{
$this->server->refresh();
}
public function get_status()
{
try {
dispatch_sync(new ProxyContainerStatusJob(
server: $this->server
));
$this->emit('proxyStatusUpdated');
} catch (\Exception $e) {
ray($e->getMessage());
}
dispatch_sync(new ProxyContainerStatusJob(
server: $this->server
));
$this->server->refresh();
$this->emit('proxyStatusUpdated');
}
}