From 45ad5e88279d09360ce5f001986ee03a7b95a62e Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Wed, 17 Jan 2024 12:26:46 +0100 Subject: feat #24: use htmx to refresh connection status every 20s --- .../dev/dnpm/etl/processor/web/ConfigController.kt | 9 +++++++++ src/main/resources/templates/configs.html | 20 ++------------------ .../templates/configs/connectionAvailable.html | 16 ++++++++++++++++ 3 files changed, 27 insertions(+), 18 deletions(-) create mode 100644 src/main/resources/templates/configs/connectionAvailable.html (limited to 'src') diff --git a/src/main/kotlin/dev/dnpm/etl/processor/web/ConfigController.kt b/src/main/kotlin/dev/dnpm/etl/processor/web/ConfigController.kt index 82c1fc0..18bf8d7 100644 --- a/src/main/kotlin/dev/dnpm/etl/processor/web/ConfigController.kt +++ b/src/main/kotlin/dev/dnpm/etl/processor/web/ConfigController.kt @@ -49,4 +49,13 @@ class ConfigController( return "configs" } + @GetMapping(params = ["connectionAvailable"]) + fun connectionAvailable(model: Model): String { + model.addAttribute("mtbFileSender", mtbFileSender.javaClass.simpleName) + model.addAttribute("mtbFileEndpoint", mtbFileSender.endpoint()) + model.addAttribute("connectionAvailable", connectionCheckService.connectionAvailable()) + + return "configs/connectionAvailable" + } + } \ No newline at end of file diff --git a/src/main/resources/templates/configs.html b/src/main/resources/templates/configs.html index 1048a39..1d6dd20 100644 --- a/src/main/resources/templates/configs.html +++ b/src/main/resources/templates/configs.html @@ -37,24 +37,7 @@ - - ✅⚡ Verbindung zum bwHC-Backend - - Verbindung über [[ ${mtbFileSender} ]]. Die Verbindung ist aktuell - verfügbar. - nicht verfügbar. - - - - - - - ETL-Processor - - bwHC-Backend - Kafka-Broker - - + ✅⛔ Transformationen @@ -100,5 +83,6 @@ +
[[ ${mtbFileSender} ]]