Fix: UI bug, do not write ssh key to disk in server dialog
This commit is contained in:
parent
845d32c94c
commit
bdc0fc87f0
2 changed files with 6 additions and 12 deletions
|
|
@ -18,18 +18,11 @@ public function setPrivateKey($privateKeyId)
|
|||
{
|
||||
try {
|
||||
$privateKey = PrivateKey::findOrFail($privateKeyId);
|
||||
$this->server->update(['private_key_id' => $privateKeyId]);
|
||||
$privateKey->storeInFileSystem();
|
||||
|
||||
$this->dispatch('notify', [
|
||||
'type' => 'success',
|
||||
'message' => 'Private key updated and stored in the file system.',
|
||||
]);
|
||||
$this->server->update(['private_key_id' => $privateKey->id]);
|
||||
$this->server->refresh();
|
||||
$this->dispatch('success', 'Private key updated successfully.');
|
||||
} catch (\Exception $e) {
|
||||
$this->dispatch('notify', [
|
||||
'type' => 'error',
|
||||
'message' => 'Failed to update private key: ' . $e->getMessage(),
|
||||
]);
|
||||
$this->dispatch('error', 'Failed to update private key: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@
|
|||
<h3 class="pb-4">Choose another Key</h3>
|
||||
<div class="grid grid-cols-3 gap-2">
|
||||
@forelse ($privateKeys as $private_key)
|
||||
<div class="box group" wire:click='setPrivateKey({{ $private_key->id }})'>
|
||||
<div class="box group cursor-pointer"
|
||||
wire:click='setPrivateKey({{ $private_key->id }})'>
|
||||
<div class="flex flex-col ">
|
||||
<div class="box-title">{{ $private_key->name }}</div>
|
||||
<div class="box-description">{{ $private_key->description }}</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue