From 5eb41e1a1527aed4095d50134ee4772fa03c9981 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 29 Aug 2023 20:34:01 +0200 Subject: [PATCH] fix boarding --- app/Http/Livewire/Boarding/Index.php | 14 ++++++++++++-- resources/views/livewire/boarding/index.blade.php | 8 ++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/app/Http/Livewire/Boarding/Index.php b/app/Http/Livewire/Boarding/Index.php index d704f4f02..539751ceb 100644 --- a/app/Http/Livewire/Boarding/Index.php +++ b/app/Http/Livewire/Boarding/Index.php @@ -1,15 +1,20 @@ currentState = 'select-proxy'; } elseif ($type === 'remote') { + $this->privateKeys = PrivateKey::ownedByCurrentTeam(['name'])->get(); $this->currentState = 'private-key'; } } + public function selectExistingPrivateKey() + { + ray($this->selectedExistingPrivateKey); + } public function setPrivateKey(string $type) { $this->privateKeyType = $type; @@ -174,7 +184,7 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA== { $this->privateKeyName = generate_random_name(); $this->privateKeyDescription = 'Created by Coolify'; - ['private' => $this->privateKey, 'public'=> $this->publicKey] = generateSSHKey(); + ['private' => $this->privateKey, 'public' => $this->publicKey] = generateSSHKey(); } public function render() { diff --git a/resources/views/livewire/boarding/index.blade.php b/resources/views/livewire/boarding/index.blade.php index 4bda0e4dc..06ff5661b 100644 --- a/resources/views/livewire/boarding/index.blade.php +++ b/resources/views/livewire/boarding/index.blade.php @@ -41,6 +41,14 @@
No (create one for me)
+
+ + @foreach ($privateKeys as $privateKey) + + @endforeach + + Select this +

SSH Keys are used to connect to a remote server through a secure shell, called SSH.