mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
fix(server): refresh the server page after background validation
ServerValidated and ServerPatchCheckFinished used broadcastAs(), so Echo listeners without a leading dot never matched them. Close the validation dialog that a background job opened when the job finishes.
This commit is contained in:
@@ -17,11 +17,6 @@ class ServerPatchCheckFinished implements ShouldBroadcast
|
||||
$this->teamId = $teamId;
|
||||
}
|
||||
|
||||
public function broadcastAs(): string
|
||||
{
|
||||
return 'ServerPatchCheckFinished';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{serverUuid: string|null}
|
||||
*/
|
||||
|
||||
@@ -20,11 +20,6 @@ class ServerValidated implements ShouldBroadcast
|
||||
$this->serverUuid = $serverUuid;
|
||||
}
|
||||
|
||||
public function broadcastAs(): string
|
||||
{
|
||||
return 'ServerValidated';
|
||||
}
|
||||
|
||||
public function broadcastWith(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -741,10 +741,15 @@ class Show extends Component
|
||||
// Refresh server data and only the display-only state that validation produces.
|
||||
// Never re-sync text-input properties via syncData() — would clobber any
|
||||
// unsaved typing (see coolify#6062 / #6354 / #9695).
|
||||
$wasValidating = $this->isValidating;
|
||||
$this->server->refresh();
|
||||
$this->server->settings->refresh();
|
||||
$this->isValidating = $this->server->is_validating ?? false;
|
||||
$this->validationLogs = $this->server->validation_logs;
|
||||
if ($wasValidating && ! $this->isValidating) {
|
||||
// The dialog was opened for a background validation job, which does not drive its checkpoints.
|
||||
$this->dispatch('background-validation-finished');
|
||||
}
|
||||
$this->isReachable = $this->server->settings->is_reachable;
|
||||
$this->isUsable = $this->server->settings->is_usable;
|
||||
|
||||
|
||||
@@ -143,7 +143,8 @@
|
||||
@endif
|
||||
|
||||
@if ($server->canBeValidated())
|
||||
<x-process-dialog closeWithX mobileFullscreen size="xl" :open="$isValidating">
|
||||
<x-process-dialog closeWithX mobileFullscreen size="xl" :open="$isValidating"
|
||||
x-on:background-validation-finished.window="processDialogOpen = false">
|
||||
<x-slot:title>Validate and configure</x-slot:title>
|
||||
<x-slot:content>
|
||||
<livewire:server.validate-and-install :server="$server"
|
||||
|
||||
Reference in New Issue
Block a user