From 033750eb1015ebc4d1612858dff54496e64a3410 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Fri, 4 Apr 2025 13:59:51 +0200 Subject: [PATCH] feat: show issue path if available in response body (#92) --- .../dev/dnpm/etl/processor/monitoring/ReportService.kt | 7 ++++++- src/main/resources/static/style.css | 10 ++++++++++ src/main/resources/templates/report.html | 8 ++++++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/dev/dnpm/etl/processor/monitoring/ReportService.kt b/src/main/kotlin/dev/dnpm/etl/processor/monitoring/ReportService.kt index 9f4c568..e9ea489 100644 --- a/src/main/kotlin/dev/dnpm/etl/processor/monitoring/ReportService.kt +++ b/src/main/kotlin/dev/dnpm/etl/processor/monitoring/ReportService.kt @@ -27,6 +27,7 @@ import com.fasterxml.jackson.databind.JsonMappingException import com.fasterxml.jackson.databind.ObjectMapper import dev.dnpm.etl.processor.monitoring.ReportService.Issue import dev.dnpm.etl.processor.monitoring.ReportService.Severity +import java.util.Optional class ReportService( private val objectMapper: ObjectMapper @@ -57,7 +58,11 @@ class ReportService( private data class DataQualityReport(val issues: List) @JsonIgnoreProperties(ignoreUnknown = true) - data class Issue(val severity: Severity, @JsonAlias("details") val message: String) + data class Issue( + val severity: Severity, + @JsonAlias("details") val message: String, + val path: Optional = Optional.empty() + ) enum class Severity(@JsonValue val value: String) { FATAL("fatal"), diff --git a/src/main/resources/static/style.css b/src/main/resources/static/style.css index c6a8c33..b6713d2 100644 --- a/src/main/resources/static/style.css +++ b/src/main/resources/static/style.css @@ -697,4 +697,14 @@ a.reload { .no-token { padding: 1em; background: var(--bg-red-op); +} + +.issue-message { + font-family: monospace; + font-weight: bolder; +} + +.issue-path { + font-family: monospace; + line-height: 1rem; } \ No newline at end of file diff --git a/src/main/resources/templates/report.html b/src/main/resources/templates/report.html index 21d1b48..5442fd4 100644 --- a/src/main/resources/templates/report.html +++ b/src/main/resources/templates/report.html @@ -47,7 +47,7 @@ Schweregrad - Beschreibung + Beschreibung und Pfad @@ -56,7 +56,11 @@ [[ ${issue.severity} ]] [[ ${issue.severity} ]] [[ ${issue.severity} ]] - [[ ${issue.message} ]] + +
[[ ${issue.message} ]]
+
[[ ${issue.path.get()} ]]
+
Keine Angabe
+