1
0
mirror of https://github.com/pcvolkmer/etl-processor.git synced 2025-07-04 15:32:55 +00:00

feat #23: add reload button to display on new request

This commit is contained in:
2024-01-15 09:17:38 +01:00
parent a1a252d5a9
commit 9d30f750f7
3 changed files with 27 additions and 1 deletions

View File

@ -132,6 +132,7 @@ class StatisticsRestController(
@GetMapping(path = ["events"], produces = [MediaType.TEXT_EVENT_STREAM_VALUE])
fun updater(): Flux<ServerSentEvent<Any>> {
return statisticsUpdateProducer.asFlux().flatMap {
println(it)
Flux.fromIterable(
listOf(
ServerSentEvent.builder<Any>()
@ -152,6 +153,10 @@ class StatisticsRestController(
.build(),
ServerSentEvent.builder<Any>()
.event("deleterequestpatientstates").id("none").data(this.requestPatientStates(true))
.build(),
ServerSentEvent.builder<Any>()
.event("newrequest").id("none").data("newrequest")
.build()
)
)