lasthourcloud/app/Http/Livewire/Server/Proxy/Status.php

24 lines
508 B
PHP
Raw Normal View History

2023-06-02 13:15:12 +00:00
<?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;
2023-07-28 12:44:26 +00:00
public function get_status()
2023-06-02 13:15:12 +00:00
{
2023-08-28 18:29:44 +00:00
if (data_get($this->server,'settings.is_usable')) {
dispatch_sync(new ProxyContainerStatusJob(
server: $this->server
));
$this->server->refresh();
$this->emit('proxyStatusUpdated');
}
2023-06-02 13:15:12 +00:00
}
}