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

fix: add info severity to data quality report

This commit is contained in:
Paul-Christian Volkmer 2023-12-05 14:22:02 +01:00
parent 8dee349c37
commit ced6609d9a
4 changed files with 19 additions and 2 deletions

View File

@ -56,5 +56,6 @@ class ReportService(
enum class Severity(@JsonValue val value: String) {
ERROR("error"),
WARNING("warning"),
INFO("info")
}
}

View File

@ -1,6 +1,9 @@
:root {
--table-border: rgba(96, 96, 96, 1);
--bg-blue: rgb(0, 74, 157);
--bg-blue-op: rgba(0, 74, 157, .35);
--bg-green: rgb(0, 128, 0);
--bg-green-op: rgba(0, 128, 0, .35);
@ -181,6 +184,15 @@ td {
font-family: monospace;
}
td.bg-blue, th.bg-blue {
background: var(--bg-blue);
color: white;
}
tr:has(td.bg-blue) {
background: var(--bg-blue-op);
}
td.bg-green, th.bg-green {
background: var(--bg-green);
color: white;

View File

@ -45,6 +45,7 @@
</thead>
<tbody>
<tr th:each="issue : ${issues}">
<td th:if="${issue.severity.value == 'info'}" class="bg-blue"><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>[[ ${issue.message} ]]</td>

View File

@ -41,6 +41,7 @@ class ReportServiceTest {
{
"patient": "4711",
"issues": [
{ "severity": "info", "message": "Info Message" },
{ "severity": "warning", "message": "Warning Message" },
{ "severity": "error", "message": "Error Message" }
]
@ -50,8 +51,10 @@ class ReportServiceTest {
val actual = this.reportService.deserialize(json)
assertThat(actual).hasSize(2)
assertThat(actual[0].severity).isEqualTo(ReportService.Severity.WARNING)
assertThat(actual[0].message).isEqualTo("Warning Message")
assertThat(actual[0].severity).isEqualTo(ReportService.Severity.INFO)
assertThat(actual[0].message).isEqualTo("Info Message")
assertThat(actual[1].severity).isEqualTo(ReportService.Severity.WARNING)
assertThat(actual[1].message).isEqualTo("Warning Message")
assertThat(actual[1].severity).isEqualTo(ReportService.Severity.ERROR)
assertThat(actual[1].message).isEqualTo("Error Message")
}