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:
@@ -47,6 +47,7 @@ class Show extends Component
|
||||
}
|
||||
});
|
||||
$this->dispatch('success', 'Private key updated successfully.');
|
||||
$this->dispatch('refreshServerShow');
|
||||
} catch (\Exception $e) {
|
||||
$this->server->refresh();
|
||||
$this->server->validateConnection();
|
||||
@@ -60,6 +61,7 @@ class Show extends Component
|
||||
['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);
|
||||
|
||||
|
Reference in New Issue
Block a user