summaryrefslogtreecommitdiff
path: root/src/main/resources/templates/report.html
blob: 1e2d97cb12ae0cf75cb5c43e61d13dbfe79c7220 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html lang="de" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>ETL-Prozessor</title>
    <link rel="stylesheet" th:href="@{/main.css}"/>
</head>
<body>
    <div th:replace="~{fragments.html :: nav}"></div>
    <main>

        <h1>Anfrage <span class="monospace">[[ ${request.uuid} ]]</span></h1>

        <div class="card">
            <div th:if="${request.status.value.contains('success')}" class="card-header bg-green">Erfolgreiche Übertragung</div>
            <div th:if="${request.status.value.contains('warning')}" class="card-header bg-yellow">Übertragung mit Warnungen</div>
            <div th:if="${request.status.value.contains('error')}" class="card-header bg-red">Übertragung mit Fehlern</div>
            <div th:if="${request.status.value == 'unknown' and not request.isPendingUnknown()}" class="card-header bg-gray">Unbekannter Status</div>
            <div th:if="${request.status.value == 'unknown' and request.isPendingUnknown()}" class="card-header bg-gray">⏰ Unbekannter Status ⏰</div>
            <div th:if="${request.status.value == 'duplication'}" class="card-header bg-gray">Gestoppt: Duplikation</div>
            <div th:if="${request.status.value == 'no-consent'}" class="card-header bg-blue">Gestoppt: Kein Consent</div>
            <div th:if="${request.status.value == 'blocked-initial'}" class="card-header bg-blue">Gestoppt: Noch keine Meldebestätigung für vorhergehende Meldung</div>
            <div class="card-sub-header" th:classappend="${request.type.value == 'delete' ? 'delete' : ''}">
                <div th:if="${request.type.value != 'delete'}">
                    <span th:if="${request.submissionType.value == 'initial'}"><span>📨 Übertragung vom </span><time th:datetime="${request.processedAt}">[[ ${request.processedAt} ]]</time></span>
                    <span th:if="${request.submissionType.value == 'addition'}"><span>🔄 Übertragung vom </span><time th:datetime="${request.processedAt}">[[ ${request.processedAt} ]]</time></span>
                    <span th:if="${request.submissionType.value == 'unknown'}"><span>❓ Übertragung vom </span><time th:datetime="${request.processedAt}">[[ ${request.processedAt} ]]</time></span>
                </div>
                <div th:if="${request.type.value == 'delete'}">
                    <span>🗑 Löschanfrage vom </span><time th:datetime="${request.processedAt}">[[ ${request.processedAt} ]]</time>
                </div>
                <div th:insert="~{fragments :: accept-initial}" sec:authorize="hasRole('USER') or hasRole('ADMIN')" th:if="${postInitialSubmissionBlock}"></div>
            </div>
            <div class="card-content">
                <div>Request-ID</div>
                <div><span>[[ ${request.uuid} ]]</span></div>
                <div>Typ</div>
                <div th:style="${request.type.value == 'delete'} ? 'color: red;'">
                            <span>
                                [[ ${request.type} ]]
                                <th:block th:if="${request.submissionType.value != 'unknown'}">([[ ${request.submissionType} ]])</th:block>
                            </span>
                </div>
                <div sec:authorize="hasRole('USER') or hasRole('ADMIN')">Patienten-Pseudonym</div>
                <div class="patient-id" th:if="${patientPseudonym != null}" sec:authorize="hasRole('USER') or hasRole('ADMIN')">
                    [[ ${request.patientPseudonym} ]]
                </div>
                <div class="patient-id" th:if="${patientPseudonym == null}" sec:authorize="hasRole('USER') or hasRole('ADMIN')">
                    <a th:href="@{/patient/{pid}(pid=${request.patientPseudonym})}">[[ ${request.patientPseudonym} ]]</a>
                </div>
                <div sec:authorize="hasRole('USER') or hasRole('ADMIN')">TAN</div>
                <div class="patient-id" sec:authorize="hasRole('USER') or hasRole('ADMIN')">
                    [[ ${request.tan} ]]
                </div>
            </div>
        </div>

        <h2 th:text="${request.report.description}"></h2>

        <p th:if="${issues.isEmpty()}">
            Keine weiteren Angaben.
        </p>

        <table th:if="${not issues.isEmpty()}">
            <thead>
                <tr>
                    <th>Schweregrad</th>
                    <th>Beschreibung und Pfad</th>
                </tr>
            </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 th:if="${issue.severity.value == 'fatal'}" class="bg-red"><small>[[ ${issue.severity} ]]</small></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>
            </tbody>
        </table>
    </main>
    <footer th:replace="~{fragments.html :: footer}"></footer>
    <script th:src="@{/main.js}"></script>
</body>
</html>