feat(private-key-refresh): add refresh dispatch on private key update and connection check
- Implemented a dispatch for 'refreshServerShow' after successfully updating the private key and validating the server connection. - This enhancement improves the user experience by ensuring the server display is updated immediately following key changes and connection checks.
This commit is contained in:
parent
2fd5e04807
commit
37c6f36b3b
1 changed files with 2 additions and 0 deletions
|
|
@ -47,6 +47,7 @@ public function setPrivateKey($privateKeyId)
|
|||
}
|
||||
});
|
||||
$this->dispatch('success', 'Private key updated successfully.');
|
||||
$this->dispatch('refreshServerShow');
|
||||
} catch (\Exception $e) {
|
||||
$this->server->refresh();
|
||||
$this->server->validateConnection();
|
||||
|
|
@ -60,6 +61,7 @@ public function checkConnection()
|
|||
['uptime' => $uptime, 'error' => $error] = $this->server->validateConnection();
|
||||
if ($uptime) {
|
||||
$this->dispatch('success', 'Server is reachable.');
|
||||
$this->dispatch('refreshServerShow');
|
||||
} else {
|
||||
$this->dispatch('error', 'Server is not reachable.<br><br>Check this <a target="_blank" class="underline" href="https://coolify.io/docs/knowledge-base/server/openssh">documentation</a> for further help.<br><br>Error: '.$error);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue