lasthourcloud/app/Http/Livewire/Server/Proxy/Status.php
Andras Bacsai e9ba295a1e fix: proxy status
fix: start proxy in case any dns set somewhere
2023-07-14 13:01:55 +02:00

29 lines
631 B
PHP

<?php
namespace App\Http\Livewire\Server\Proxy;
use App\Jobs\ProxyContainerStatusJob;
use App\Models\Server;
use Livewire\Component;
class Status extends Component
{
public Server $server;
protected $listeners = ['proxyStatusUpdated'];
public function proxyStatusUpdated()
{
$this->server->refresh();
}
public function proxyStatus()
{
try {
dispatch_sync(new ProxyContainerStatusJob(
server: $this->server
));
$this->emit('proxyStatusUpdated');
} catch (\Exception $e) {
ray($e->getMessage());
}
}
}