diff --git a/app/Http/Livewire/Server/Form.php b/app/Http/Livewire/Server/Form.php
index 54961e273..521e089f6 100644
--- a/app/Http/Livewire/Server/Form.php
+++ b/app/Http/Livewire/Server/Form.php
@@ -8,7 +8,6 @@ use Livewire\Component;
class Form extends Component
{
- public $server_id;
public Server $server;
public $uptime;
public $dockerVersion;
@@ -22,10 +21,6 @@ class Form extends Component
'server.settings.is_reachable' => 'required',
'server.settings.is_part_of_swarm' => 'required'
];
- public function mount()
- {
- $this->server = Server::find($this->server_id)->load(['settings']);
- }
public function installDocker()
{
$activity = resolve(InstallDocker::class)($this->server);
diff --git a/app/Http/Livewire/Server/PrivateKey.php b/app/Http/Livewire/Server/PrivateKey.php
index 2bd939723..420ce1b60 100644
--- a/app/Http/Livewire/Server/PrivateKey.php
+++ b/app/Http/Livewire/Server/PrivateKey.php
@@ -2,28 +2,27 @@
namespace App\Http\Livewire\Server;
-use App\Models\PrivateKey as ModelsPrivateKey;
use App\Models\Server;
use Illuminate\Support\Facades\Storage;
use Livewire\Component;
class PrivateKey extends Component
{
- public $private_keys;
+ public Server $server;
+ public $privateKeys;
public $parameters;
public function setPrivateKey($private_key_id)
{
- $server = Server::where('uuid', $this->parameters['server_uuid']);
- $server->update([
+ $this->server->update([
'private_key_id' => $private_key_id
]);
+
// Delete the old ssh mux file to force a new one to be created
- Storage::disk('ssh-mux')->delete("{$server->first()->ip}_{$server->first()->port}_{$server->first()->user}");
- return redirect()->route('server.show', $this->parameters['server_uuid']);
+ Storage::disk('ssh-mux')->delete("{$this->server->first()->ip}_{$this->server->first()->port}_{$this->server->first()->user}");
+ $this->server->refresh();
}
public function mount()
{
$this->parameters = getRouteParameters();
- $this->private_keys = ModelsPrivateKey::where('team_id', session('currentTeam')->id)->get();
}
}
diff --git a/resources/views/components/server/navbar.blade.php b/resources/views/components/server/navbar.blade.php
index 3f2bc7e0b..86d486339 100644
--- a/resources/views/components/server/navbar.blade.php
+++ b/resources/views/components/server/navbar.blade.php
@@ -14,6 +14,18 @@
]) }}">
+
+
+
+
+
+
@if (request()->routeIs('server.proxy'))