Fix styling
This commit is contained in:
committed by
github-actions[bot]
parent
41fb6a1fc9
commit
d86274cc37
@@ -11,20 +11,24 @@ use Livewire\Component;
|
||||
class Deploy extends Component
|
||||
{
|
||||
public Server $server;
|
||||
|
||||
public bool $traefikDashboardAvailable = false;
|
||||
|
||||
public ?string $currentRoute = null;
|
||||
|
||||
public ?string $serverIp = null;
|
||||
|
||||
public function getListeners()
|
||||
{
|
||||
$teamId = auth()->user()->currentTeam()->id;
|
||||
|
||||
return [
|
||||
"echo-private:team.{$teamId},ProxyStatusChanged" => 'proxyStarted',
|
||||
'proxyStatusUpdated',
|
||||
'traefikDashboardAvailable',
|
||||
'serverRefresh' => 'proxyStatusUpdated',
|
||||
"checkProxy",
|
||||
"startProxy"
|
||||
'checkProxy',
|
||||
'startProxy',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -37,19 +41,23 @@ class Deploy extends Component
|
||||
}
|
||||
$this->currentRoute = request()->route()->getName();
|
||||
}
|
||||
|
||||
public function traefikDashboardAvailable(bool $data)
|
||||
{
|
||||
$this->traefikDashboardAvailable = $data;
|
||||
}
|
||||
|
||||
public function proxyStarted()
|
||||
{
|
||||
CheckProxy::run($this->server, true);
|
||||
$this->dispatch('success', 'Proxy started.');
|
||||
}
|
||||
|
||||
public function proxyStatusUpdated()
|
||||
{
|
||||
$this->server->refresh();
|
||||
}
|
||||
|
||||
public function restart()
|
||||
{
|
||||
try {
|
||||
@@ -59,6 +67,7 @@ class Deploy extends Component
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
|
||||
public function checkProxy()
|
||||
{
|
||||
try {
|
||||
@@ -69,6 +78,7 @@ class Deploy extends Component
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
|
||||
public function startProxy()
|
||||
{
|
||||
try {
|
||||
@@ -86,11 +96,11 @@ class Deploy extends Component
|
||||
try {
|
||||
if ($this->server->isSwarm()) {
|
||||
instant_remote_process([
|
||||
"docker service rm coolify-proxy_traefik",
|
||||
'docker service rm coolify-proxy_traefik',
|
||||
], $this->server);
|
||||
} else {
|
||||
instant_remote_process([
|
||||
"docker rm -f coolify-proxy",
|
||||
'docker rm -f coolify-proxy',
|
||||
], $this->server);
|
||||
}
|
||||
$this->server->proxy->status = 'exited';
|
||||
|
||||
Reference in New Issue
Block a user