summaryrefslogtreecommitdiff
path: root/src/main/resources/templates
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2023-07-25 16:50:20 +0200
committerPaul-Christian Volkmer2023-07-25 16:50:20 +0200
commitcd46fa7e0904d3de182d947dc1820a9e833673e6 (patch)
treeee2911e32763c7ce453efbaf8bc118d73df28572 /src/main/resources/templates
parent46928964ef2b469a8c3f9eb997591ead0e6ea093 (diff)
Add start and statistics page
Diffstat (limited to 'src/main/resources/templates')
-rw-r--r--src/main/resources/templates/fragments.html17
-rw-r--r--src/main/resources/templates/index.html40
-rw-r--r--src/main/resources/templates/statistics.html24
3 files changed, 81 insertions, 0 deletions
diff --git a/src/main/resources/templates/fragments.html b/src/main/resources/templates/fragments.html
new file mode 100644
index 0000000..369add3
--- /dev/null
+++ b/src/main/resources/templates/fragments.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html xmlns:th="http://www.thymeleaf.org">
+<head>
+ <meta charset="UTF-8">
+ <link rel="stylesheet" th:href="@{/style.css}" />
+</head>
+<body>
+ <div th:fragment="nav">
+ <nav>
+ <ul>
+ <li><a th:href="@{/}">Übersicht</a></li>
+ <li><a th:href="@{/statistics}">Statistiken</a></li>
+ </ul>
+ </nav>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html
new file mode 100644
index 0000000..8aa60d1
--- /dev/null
+++ b/src/main/resources/templates/index.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html lang="de" xmlns:th="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>Letzte Anfragen</h1>
+
+ <table>
+ <thead>
+ <tr>
+ <th>Status</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 == 'success'}" class="bg-green"><small>[[ ${request.status} ]]</small></td>
+ <td th:if="${request.status.value == 'warning'}" class="bg-yellow"><small>[[ ${request.status} ]]</small></td>
+ <td th:if="${request.status.value == '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>[[ ${request.uuid} ]]</td>
+ <td><time th:datetime="${request.processedAt}">[[ ${request.processedAt} ]]</time></td>
+ <td>[[ ${request.patientId} ]]</td>
+ </tr>
+ </tbody>
+ </table>
+
+ </main>
+ <script th:src="@{/scripts.js}"></script>
+</body>
+</html> \ No newline at end of file
diff --git a/src/main/resources/templates/statistics.html b/src/main/resources/templates/statistics.html
new file mode 100644
index 0000000..3f2a11b
--- /dev/null
+++ b/src/main/resources/templates/statistics.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html lang="de" xmlns:th="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>Statistiken</h1>
+
+ <div id="piechart" class="chart" style="width: 320px; height: 320px; display: inline-block"></div>
+ <div id="barchart" class="chart" style="width: 720px; height: 320px; display: inline-block"></div>
+
+ </main>
+ <script th:src="@{/echarts.min.js}"></script>
+ <script th:src="@{/scripts.js}"></script>
+ <script>
+ drawPieChart('statistics/requeststates', 'piechart', 'Statusverteilung der Anfragen');
+ drawBarChart('statistics/requestslastmonth', 'barchart', 'Anfragen des letzten Monats');
+ </script>
+</body>
+</html> \ No newline at end of file