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:
Andras Bacsai
2026-11-05 12:53:54 +01:00
parent cc996a1d9f
commit 30a8e3357a
4 changed files with 7 additions and 11 deletions
-5
View File
@@ -17,11 +17,6 @@ class ServerPatchCheckFinished implements ShouldBroadcast
$this->teamId = $teamId;
}
public function broadcastAs(): string
{
return 'ServerPatchCheckFinished';
}
/**
* @return array{serverUuid: string|null}
*/
-5
View File
@@ -20,11 +20,6 @@ class ServerValidated implements ShouldBroadcast
$this->serverUuid = $serverUuid;
}
public function broadcastAs(): string
{
return 'ServerValidated';
}
public function broadcastWith(): array
{
return [
+5
View File
@@ -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"