1
0
mirror of https://github.com/pcvolkmer/etl-processor.git synced 2025-04-19 09:16:51 +00:00

feat: add checks for DNPM:DIP backend

Since DNPM:DIP responds with HTTP 404 on API base path, the Kaplan-Meier Config
endpoint will be used to check availability of DNPM:DIP backend API.
This commit is contained in:
Paul-Christian Volkmer 2025-03-20 14:39:40 +01:00
parent f347653be8
commit 47ebe46974
2 changed files with 11 additions and 2 deletions

View File

@ -121,7 +121,15 @@ class RestConnectionCheckService(
fun check() {
result = try {
val available = restTemplate.getForEntity(
restTargetProperties.uri?.replace("/etl/api", "").toString(),
if (restTargetProperties.isBwhc) {
UriComponentsBuilder.fromUriString(restTargetProperties.uri.toString()).path("").toUriString()
} else {
UriComponentsBuilder.fromUriString(restTargetProperties.uri.toString())
.pathSegment("mtb")
.pathSegment("kaplan-meier")
.pathSegment("config")
.toUriString()
},
String::class.java
).statusCode == HttpStatus.OK

View File

@ -20,7 +20,8 @@
<img th:if="${mtbFileSender.startsWith('Kafka')}" th:src="@{/kafka.png}" alt="Kafka-Broker" />
<span>ETL-Processor</span>
<span></span>
<span th:if="${mtbFileSender.startsWith('Rest')}">bwHC-Backend</span>
<span th:if="${mtbFileSender.startsWith('RestBwhc')}">bwHC-Backend</span>
<span th:if="${mtbFileSender.startsWith('RestDip')}">DNPM:DIP-Backend</span>
<span th:if="${mtbFileSender.startsWith('Kafka')}">Kafka-Broker</span>
</div>
</th:block>