fix: Traefik start on new server validation

fix: Multiple server selection ui flow
This commit is contained in:
Andras Bacsai
2025-05-26 21:06:00 +02:00
parent 6ea6d2742b
commit be0453d9df
5 changed files with 14 additions and 57 deletions

View File

@@ -2,8 +2,6 @@
namespace App\Livewire\Server;
use App\Actions\Proxy\CheckProxy;
use App\Actions\Proxy\StartProxy;
use App\Models\Server;
use Livewire\Component;
@@ -39,7 +37,6 @@ class ValidateAndInstall extends Component
'validateOS',
'validateDockerEngine',
'validateDockerVersion',
'startProxy',
'refresh' => '$refresh',
];
@@ -64,25 +61,6 @@ class ValidateAndInstall extends Component
$this->init();
}
public function startProxy()
{
try {
$shouldStart = CheckProxy::run($this->server);
if ($shouldStart) {
$proxy = StartProxy::run($this->server, false);
if ($proxy === 'OK') {
$this->proxy_started = true;
} else {
throw new \Exception('Proxy could not be started.');
}
} else {
$this->proxy_started = true;
}
} catch (\Throwable $e) {
return handleError($e, $this);
}
}
public function validateConnection()
{
['uptime' => $this->uptime, 'error' => $error] = $this->server->validateConnection();
@@ -172,7 +150,6 @@ class ValidateAndInstall extends Component
if ($this->server->isBuildServer()) {
return;
}
$this->dispatch('startProxy');
}
public function render()