mirror of
https://github.com/pcvolkmer/etl-processor.git
synced 2025-04-21 10:16:50 +00:00
99 lines
6.3 KiB
HTML
99 lines
6.3 KiB
HTML
<!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="@{/style.css}" />
|
|
</head>
|
|
<body>
|
|
<div th:replace="~{fragments.html :: nav}"></div>
|
|
<main>
|
|
|
|
<h1>Alle Anfragen<a id="reload-notify" class="reload" title="Neue Anfragen" th:href="@{/}">⟳</a></h1>
|
|
|
|
<div>
|
|
<h2 th:if="${patientId != null}">
|
|
Betreffend Patienten-Pseudonym <span class="monospace" th:text="${patientId}">***</span>
|
|
<a class="btn btn-blue" th:if="${patientId != null}" th:href="@{/}">Alle anzeigen</a>
|
|
</h2>
|
|
</div>
|
|
|
|
<div class="border">
|
|
<div th:if="${patientId == null}" class="page-control">
|
|
<a id="first-page-link" th:href="@{/(page=${0})}" title="Zum Anfang: Taste W" th:if="${not requests.isFirst()}">⇤</a><a th:if="${requests.isFirst()}">⇤</a>
|
|
<a id="prev-page-link" th:href="@{/(page=${requests.getNumber() - 1})}" title="Seite zurück: Taste A" th:if="${not requests.isFirst()}">←</a><a th:if="${requests.isFirst()}">←</a>
|
|
<span>Seite [[ ${requests.getNumber() + 1} ]] von [[ ${requests.getTotalPages()} ]]</span>
|
|
<a id="next-page-link" th:href="@{/(page=${requests.getNumber() + 1})}" title="Seite vor: Taste D" th:if="${not requests.isLast()}">→</a><a th:if="${requests.isLast()}">→</a>
|
|
<a id="last-page-link" th:href="@{/(page=${requests.getTotalPages() - 1})}" title="Zum Ende: Taste S" th:if="${not requests.isLast()}">⇥</a><a th:if="${requests.isLast()}">⇥</a>
|
|
</div>
|
|
<div th:if="${patientId != null}" class="page-control">
|
|
<a id="first-page-link" th:href="@{/patient/{patientId}(patientId=${patientId},page=${0})}" title="Zum Anfang: Taste W" th:if="${not requests.isFirst()}">⇤</a><a th:if="${requests.isFirst()}">⇤</a>
|
|
<a id="prev-page-link" th:href="@{/patient/{patientId}(patientId=${patientId},page=${requests.getNumber() - 1})}" title="Seite zurück: Taste A" th:if="${not requests.isFirst()}">←</a><a th:if="${requests.isFirst()}">←</a>
|
|
<span>Seite [[ ${requests.getNumber() + 1} ]] von [[ ${requests.getTotalPages()} ]]</span>
|
|
<a id="next-page-link" th:href="@{/patient/{patientId}(patientId=${patientId},page=${requests.getNumber() + 1})}" title="Seite vor: Taste D" th:if="${not requests.isLast()}">→</a><a th:if="${requests.isLast()}">→</a>
|
|
<a id="last-page-link" th:href="@{/patient/{patientId}(patientId=${patientId},page=${requests.getTotalPages() - 1})}" title="Zum Ende: Taste S" th:if="${not requests.isLast()}">⇥</a><a th:if="${requests.isLast()}">⇥</a>
|
|
</div>
|
|
<table class="paged">
|
|
<thead>
|
|
<tr>
|
|
<th>Status</th>
|
|
<th>Typ</th>
|
|
<th>ID</th>
|
|
<th>Datum</th>
|
|
<th>Patienten-ID</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr th:each="request : ${requests}">
|
|
<td th:if="${request.status.value.contains('success')}" class="bg-green"><small>[[ ${request.status} ]]</small></td>
|
|
<td th:if="${request.status.value.contains('warning')}" class="bg-yellow"><small>[[ ${request.status} ]]</small></td>
|
|
<td th:if="${request.status.value.contains('error')}" class="bg-red"><small>[[ ${request.status} ]]</small></td>
|
|
<td th:if="${request.status.value == 'unknown'}" class="bg-gray"><small>[[ ${request.status} ]]</small></td>
|
|
<td th:if="${request.status.value == 'duplication'}" class="bg-gray"><small>[[ ${request.status} ]]</small></td>
|
|
<td th:style="${request.type.value == 'delete'} ? 'color: red;'"><small>[[ ${request.type} ]]</small></td>
|
|
<td th:if="not ${request.report}">[[ ${request.uuid} ]]</td>
|
|
<td th:if="${request.report}">
|
|
<a th:href="@{/report/{id}(id=${request.uuid})}" sec:authorize="hasRole('USER') or hasRole('ADMIN')">[[ ${request.uuid} ]]</a>
|
|
<th:block sec:authorize="not (hasRole('USER') or hasRole('ADMIN'))">[[ ${request.uuid} ]]</th:block>
|
|
</td>
|
|
<td><time th:datetime="${request.processedAt}">[[ ${request.processedAt} ]]</time></td>
|
|
<td class="patient-id" th:if="${patientId != null}" sec:authorize="hasRole('USER') or hasRole('ADMIN')">
|
|
[[ ${request.patientId} ]]
|
|
</td>
|
|
<td class="patient-id" th:if="${patientId == null}" sec:authorize="hasRole('USER') or hasRole('ADMIN')">
|
|
<a th:href="@{/patient/{pid}(pid=${request.patientId})}">[[ ${request.patientId} ]]</a>
|
|
</td>
|
|
<td class="patient-id" sec:authorize="not (hasRole('USER') or hasRole('ADMIN'))">***</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
</main>
|
|
<script th:src="@{/scripts.js}"></script>
|
|
<script>
|
|
window.addEventListener('load', () => {
|
|
let keyBindings = {
|
|
'w': 'first-page-link',
|
|
'a': 'prev-page-link',
|
|
'd': 'next-page-link',
|
|
's': 'last-page-link'
|
|
};
|
|
window.onkeydown = (event) => {
|
|
for (const [key, elemId] of Object.entries(keyBindings)) {
|
|
if (event.key === key && document.getElementById(elemId)) {
|
|
document.getElementById(elemId).style.background = 'yellow';
|
|
document.getElementById(elemId).click();
|
|
}
|
|
}
|
|
};
|
|
});
|
|
|
|
const eventSource = new EventSource('statistics/events');
|
|
eventSource.addEventListener('newrequest', event => {
|
|
console.log(event);
|
|
document.getElementById('reload-notify').style.display = 'inline-flex';
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |