diff --git a/app/Http/Livewire/Boarding/Index.php b/app/Http/Livewire/Boarding/Index.php index 67221d0c6..19c51d5ce 100644 --- a/app/Http/Livewire/Boarding/Index.php +++ b/app/Http/Livewire/Boarding/Index.php @@ -32,6 +32,7 @@ class Index extends Component public ?int $remoteServerPort = 22; public ?string $remoteServerUser = 'root'; public bool $isSwarmManager = false; + public bool $isCloudflareTunnel = false; public ?Server $createdServer = null; public Collection $projects; @@ -184,6 +185,7 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA== 'team_id' => currentTeam()->id, ]); $this->createdServer->settings->is_swarm_manager = $this->isSwarmManager; + $this->createdServer->settings->is_cloudflare_tunnel = $this->isCloudflareTunnel; $this->createdServer->settings->save(); $this->createdServer->addInitialNetwork(); $this->validateServer(); @@ -200,6 +202,7 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA== ]); } catch (\Throwable $e) { $this->serverReachable = false; + $this->createdServer->delete(); return handleError(error: $e, livewire: $this); } diff --git a/app/Models/Server.php b/app/Models/Server.php index f65ecfb10..439bba990 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -87,8 +87,6 @@ class Server extends BaseModel return $this->hasOne(ServerSetting::class); } public function addInitialNetwork() { - ray($this->id); - if ($this->id === 0) { if ($this->isSwarm()) { SwarmDocker::create([ diff --git a/resources/views/livewire/boarding/index.blade.php b/resources/views/livewire/boarding/index.blade.php index 98a2c772a..ea14faae1 100644 --- a/resources/views/livewire/boarding/index.blade.php +++ b/resources/views/livewire/boarding/index.blade.php @@ -207,10 +207,11 @@ placeholder="Username to connect to your server. Default is root." label="Username" id="remoteServerUser" /> - {{--
- -
--}} +
+ +
Check Connection