mirror of
https://github.com/pcvolkmer/etl-processor.git
synced 2025-04-19 17:26:51 +00:00
feat: show issue path if available in response body (#92)
This commit is contained in:
parent
befeef3153
commit
033750eb10
@ -27,6 +27,7 @@ import com.fasterxml.jackson.databind.JsonMappingException
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper
|
import com.fasterxml.jackson.databind.ObjectMapper
|
||||||
import dev.dnpm.etl.processor.monitoring.ReportService.Issue
|
import dev.dnpm.etl.processor.monitoring.ReportService.Issue
|
||||||
import dev.dnpm.etl.processor.monitoring.ReportService.Severity
|
import dev.dnpm.etl.processor.monitoring.ReportService.Severity
|
||||||
|
import java.util.Optional
|
||||||
|
|
||||||
class ReportService(
|
class ReportService(
|
||||||
private val objectMapper: ObjectMapper
|
private val objectMapper: ObjectMapper
|
||||||
@ -57,7 +58,11 @@ class ReportService(
|
|||||||
private data class DataQualityReport(val issues: List<Issue>)
|
private data class DataQualityReport(val issues: List<Issue>)
|
||||||
|
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@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<String> = Optional.empty()
|
||||||
|
)
|
||||||
|
|
||||||
enum class Severity(@JsonValue val value: String) {
|
enum class Severity(@JsonValue val value: String) {
|
||||||
FATAL("fatal"),
|
FATAL("fatal"),
|
||||||
|
@ -698,3 +698,13 @@ a.reload {
|
|||||||
padding: 1em;
|
padding: 1em;
|
||||||
background: var(--bg-red-op);
|
background: var(--bg-red-op);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.issue-message {
|
||||||
|
font-family: monospace;
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
.issue-path {
|
||||||
|
font-family: monospace;
|
||||||
|
line-height: 1rem;
|
||||||
|
}
|
@ -47,7 +47,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Schweregrad</th>
|
<th>Schweregrad</th>
|
||||||
<th>Beschreibung</th>
|
<th>Beschreibung und Pfad</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -56,7 +56,11 @@
|
|||||||
<td th:if="${issue.severity.value == 'warning'}" class="bg-yellow"><small>[[ ${issue.severity} ]]</small></td>
|
<td th:if="${issue.severity.value == 'warning'}" class="bg-yellow"><small>[[ ${issue.severity} ]]</small></td>
|
||||||
<td th:if="${issue.severity.value == 'error'}" class="bg-red"><small>[[ ${issue.severity} ]]</small></td>
|
<td th:if="${issue.severity.value == 'error'}" class="bg-red"><small>[[ ${issue.severity} ]]</small></td>
|
||||||
<td th:if="${issue.severity.value == 'fatal'}" class="bg-red"><small>[[ ${issue.severity} ]]</small></td>
|
<td th:if="${issue.severity.value == 'fatal'}" class="bg-red"><small>[[ ${issue.severity} ]]</small></td>
|
||||||
<td>[[ ${issue.message} ]]</td>
|
<td>
|
||||||
|
<div class="issue-message">[[ ${issue.message} ]]</div>
|
||||||
|
<div class="issue-path" th:if="${issue.path.isPresent()}">[[ ${issue.path.get()} ]]</div>
|
||||||
|
<div class="issue-path" th:if="${issue.path.isEmpty()}"><i>Keine Angabe</i></div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user