diff --git a/build.gradle.kts b/build.gradle.kts index df901e0..610f987 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,6 +20,7 @@ var versions = mapOf( "mockito-kotlin" to "5.2.1", // Webjars "echarts" to "5.4.3", + "htmx.org" to "1.9.10" ) java { @@ -70,6 +71,7 @@ dependencies { implementation("com.jayway.jsonpath:json-path") implementation("org.webjars:webjars-locator:0.50") implementation("org.webjars.npm:echarts:${versions["echarts"]}") + implementation("org.webjars.npm:htmx.org:${versions["htmx.org"]}") runtimeOnly("org.mariadb.jdbc:mariadb-java-client") runtimeOnly("org.postgresql:postgresql") developmentOnly("org.springframework.boot:spring-boot-devtools") 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 - ETL-Processor - - bwHC-Backend - Kafka-Broker -
-
+

Transformationen

@@ -100,5 +83,6 @@
+ \ No newline at end of file diff --git a/src/main/resources/templates/configs/connectionAvailable.html b/src/main/resources/templates/configs/connectionAvailable.html new file mode 100644 index 0000000..6d52d70 --- /dev/null +++ b/src/main/resources/templates/configs/connectionAvailable.html @@ -0,0 +1,16 @@ +

Verbindung zum bwHC-Backend

+
+ Verbindung über [[ ${mtbFileSender} ]]. Die Verbindung ist aktuell + verfügbar. + nicht verfügbar. +
+
+ ETL-Processor + + bwHC-Backend + Kafka-Broker + ETL-Processor + + bwHC-Backend + Kafka-Broker +
\ No newline at end of file