fixes
This commit is contained in:
@@ -11,18 +11,13 @@ class Deploy extends Component
|
||||
{
|
||||
public Server $server;
|
||||
public $proxy_settings = null;
|
||||
protected $listeners = ['proxyStatusUpdated'];
|
||||
public function proxyStatusUpdated()
|
||||
{
|
||||
$this->server->refresh();
|
||||
}
|
||||
public function start_proxy()
|
||||
{
|
||||
if (
|
||||
$this->server->proxy->last_applied_settings &&
|
||||
$this->server->proxy->last_saved_settings !== $this->server->proxy->last_applied_settings
|
||||
) {
|
||||
$this->saveConfiguration($this->server);
|
||||
$this->emit('saveConfiguration', $server);
|
||||
}
|
||||
$activity = resolve(StartProxy::class)($this->server);
|
||||
$this->emit('newMonitorActivity', $activity->id);
|
||||
@@ -36,8 +31,4 @@ class Deploy extends Component
|
||||
$this->server->save();
|
||||
$this->emit('proxyStatusUpdated');
|
||||
}
|
||||
private function saveConfiguration(Server $server)
|
||||
{
|
||||
$this->emit('saveConfiguration', $server);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user