Feat(mercure): broadcast output and finishedAt in trace events for real-time logs
parent
bca1f4392f
commit
c29af77466
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
## [1.9.2] - 2026-07-23
|
||||
|
||||
### Added
|
||||
- Mercure (`TraceStatusProgressNotifier`): Publish `output` and `finishedAt` fields in Mercure traces event for real-time log updates without page reload.
|
||||
|
||||
### Fixed
|
||||
- Menú del navegador (`main.html.twig`): Modificada la acción por defecto para el arranque de sistemas operativos. Se ha cambiado de `command+output:` a `command:` para evitar que se abra la ventana emergente de salida de comandos, ofreciendo una experiencia de arranque más limpia.
|
||||
- Webhook (`StatusController` y `RunScriptAction`): Solucionado el problema de condición de carrera que creaba trazas duplicadas al ejecutar scripts. Ahora se establece el estado a `IN_PROGRESS` de forma síncrona en `RunScriptAction` al enviar el script a clientes Windows/Linux, prescindiendo del problemático webhook asíncrono `START_SCRIPT`.
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ class TraceStatusProgressNotifier
|
|||
'status' => $trace->getStatus(),
|
||||
'progress' => $trace->getProgress(),
|
||||
'finishedAt' => $trace->getFinishedAt()?->format(\DateTimeInterface::ATOM),
|
||||
'output' => $trace->getOutput()
|
||||
])
|
||||
);
|
||||
$this->hub->publish($update);
|
||||
|
|
@ -55,6 +56,8 @@ class TraceStatusProgressNotifier
|
|||
'client' => $trace->getUuid(),
|
||||
'status' => $trace->getStatus(),
|
||||
'progress' => $trace->getProgress(),
|
||||
'finishedAt' => $trace->getFinishedAt()?->format(\DateTimeInterface::ATOM),
|
||||
'output' => $trace->getOutput() ? substr($trace->getOutput(), 0, 200) . '...' : null,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue