diff options
Diffstat (limited to 'src/main/resources')
8 files changed, 96 insertions, 48 deletions
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 3d4827c..895f026 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -3,17 +3,34 @@ spring: compose: file: ./dev-compose.yml + security: + oauth2: + client: + registration: + custom: + client-name: App-Dev + client-id: app-dev + client-secret: very-secret-ae3f7a-5a9f-1190 + scope: + - openid + provider: + custom: + issuer-uri: https://dnpm.dev/auth/realms/intern + user-name-attribute: name + app: - #rest: - # uri: http://localhost:9000/bwhc/etl/api - kafka: - topic: test - response-topic: test_response - servers: localhost:9094 - #security: - # admin-user: admin - # admin-password: "{noop}very-secret" + rest: + uri: http://localhost:9000/bwhc/etl/api + #kafka: + # topic: test + # response-topic: test_response + # servers: localhost:9094 + security: + admin-user: admin + admin-password: "{noop}very-secret" + enable-oidc: "true" server: port: 8000 + diff --git a/src/main/resources/db/migration/mariadb/V0_4_0__RenamePatientPseudonym.sql b/src/main/resources/db/migration/mariadb/V0_4_0__RenamePatientPseudonym.sql new file mode 100644 index 0000000..bb2b0cc --- /dev/null +++ b/src/main/resources/db/migration/mariadb/V0_4_0__RenamePatientPseudonym.sql @@ -0,0 +1 @@ +ALTER TABLE request RENAME COLUMN patient_id TO patient_pseudonym;
\ No newline at end of file diff --git a/src/main/resources/db/migration/postgresql/V0_4_0__RenamePatientPseudonym.sql b/src/main/resources/db/migration/postgresql/V0_4_0__RenamePatientPseudonym.sql new file mode 100644 index 0000000..bb2b0cc --- /dev/null +++ b/src/main/resources/db/migration/postgresql/V0_4_0__RenamePatientPseudonym.sql @@ -0,0 +1 @@ +ALTER TABLE request RENAME COLUMN patient_id TO patient_pseudonym;
\ No newline at end of file diff --git a/src/main/resources/static/style.css b/src/main/resources/static/style.css index 1dd68ed..c6a8c33 100644 --- a/src/main/resources/static/style.css +++ b/src/main/resources/static/style.css @@ -22,6 +22,10 @@ --bg-gray-op: rgba(112, 128, 144, .35); } +* { + font-family: sans-serif; +} + html { background: linear-gradient(-5deg, var(--bg-blue-op), transparent 10em); min-height: 100vh; @@ -30,7 +34,6 @@ html { body { margin: 0 0 5em 0; - font-family: sans-serif; font-size: .8rem; color: var(--text); @@ -619,6 +622,10 @@ input.inline:focus-visible { text-align: center; } +.notification.info { + color: var(--bg-blue); +} + .notification.success { color: var(--bg-green); } @@ -643,14 +650,16 @@ input.inline:focus-visible { .tab:hover, .tab.active { - background: var(--table-border); + background: var(--bg-gray); + color: white; } .tabcontent { - border: 1px solid var(--table-border); + border: 2px solid var(--bg-gray); border-radius: 0 .5em .5em .5em; display: none; padding: 1em; + background: white; } .tabcontent.active { diff --git a/src/main/resources/templates/configs/gPasConnectionAvailable.html b/src/main/resources/templates/configs/gPasConnectionAvailable.html index 6dccc60..a9a8517 100644 --- a/src/main/resources/templates/configs/gPasConnectionAvailable.html +++ b/src/main/resources/templates/configs/gPasConnectionAvailable.html @@ -2,15 +2,20 @@ <h2><span>🟦</span> gPAS nicht konfiguriert - Patienten-IDs werden intern anonymisiert</h2> </th:block> <th:block th:if="${gPasConnectionAvailable != null}"> - <h2><span th:if="${gPasConnectionAvailable}">✅</span><span th:if="${not(gPasConnectionAvailable)}">⚡</span> Verbindung zu gPAS</h2> + <h2><span th:if="${gPasConnectionAvailable.available}">✅</span><span th:if="${not(gPasConnectionAvailable.available)}">⚡</span> Verbindung zu gPAS</h2> <div> - Die Verbindung ist aktuell - <strong th:if="${gPasConnectionAvailable}" style="color: green">verfügbar.</strong> - <strong th:if="${not(gPasConnectionAvailable)}" style="color: red">nicht verfügbar.</strong> + Stand: <time style="font-weight: bold" th:datetime="${#temporals.formatISO(gPasConnectionAvailable.timestamp)}" th:text="${#temporals.formatISO(gPasConnectionAvailable.timestamp)}"></time> + | + Letzte Änderung: <time style="font-weight: bold" th:datetime="${#temporals.formatISO(gPasConnectionAvailable.lastChange)}" th:text="${#temporals.formatISO(gPasConnectionAvailable.lastChange)}"></time> + </div> + <div> + <span>Die Verbindung ist aktuell</span> + <strong th:if="${gPasConnectionAvailable.available}" style="color: green">verfügbar.</strong> + <strong th:if="${not(gPasConnectionAvailable.available)}" style="color: red">nicht verfügbar.</strong> </div> <div class="connection-display border"> <img th:src="@{/server.png}" alt="ETL-Processor" /> - <span class="connection" th:classappend="${gPasConnectionAvailable ? 'available' : ''}"></span> + <span class="connection" th:classappend="${gPasConnectionAvailable.available ? 'available' : ''}"></span> <img th:src="@{/server.png}" alt="gPAS" /> <span>ETL-Processor</span> <span></span> diff --git a/src/main/resources/templates/configs/outputConnectionAvailable.html b/src/main/resources/templates/configs/outputConnectionAvailable.html index 2b18b75..93ad549 100644 --- a/src/main/resources/templates/configs/outputConnectionAvailable.html +++ b/src/main/resources/templates/configs/outputConnectionAvailable.html @@ -1,16 +1,27 @@ -<h2><span th:if="${outputConnectionAvailable}">✅</span><span th:if="${not(outputConnectionAvailable)}">⚡</span> MTB-File Verbindung</h2> -<div> - Verbindung über <code>[[ ${mtbFileSender} ]]</code>. Die Verbindung ist aktuell - <strong th:if="${outputConnectionAvailable}" style="color: green">verfügbar.</strong> - <strong th:if="${not(outputConnectionAvailable)}" style="color: red">nicht verfügbar.</strong> -</div> -<div class="connection-display border"> - <img th:src="@{/server.png}" alt="ETL-Processor" /> - <span class="connection" th:classappend="${outputConnectionAvailable ? 'available' : ''}"></span> - <img th:if="${mtbFileSender.startsWith('Rest')}" th:src="@{/server.png}" alt="bwHC-Backend" /> - <img th:if="${mtbFileSender.startsWith('Kafka')}" th:src="@{/kafka.png}" alt="Kafka-Broker" /> - <span>ETL-Processor</span> - <span></span> - <span th:if="${mtbFileSender.startsWith('Rest')}">bwHC-Backend</span> - <span th:if="${mtbFileSender.startsWith('Kafka')}">Kafka-Broker</span> -</div>
\ No newline at end of file +<th:block th:if="${outputConnectionAvailable == null}"> + <h2><span>🟦</span> Keine Ausgabenkonfiguration</h2> +</th:block> +<th:block th:if="${outputConnectionAvailable != null}"> + <h2><span th:if="${outputConnectionAvailable.available}">✅</span><span th:if="${not(outputConnectionAvailable.available)}">⚡</span> MTB-File Verbindung</h2> + <div> + Stand: <time style="font-weight: bold" th:datetime="${#temporals.formatISO(outputConnectionAvailable.timestamp)}" th:text="${#temporals.formatISO(outputConnectionAvailable.timestamp)}"></time> + | + Letzte Änderung: <time style="font-weight: bold" th:datetime="${#temporals.formatISO(outputConnectionAvailable.lastChange)}" th:text="${#temporals.formatISO(outputConnectionAvailable.lastChange)}"></time> + </div> + <div> + Verbindung über <code>[[ ${mtbFileSender} ]]</code>. Die Verbindung ist aktuell + <strong th:if="${outputConnectionAvailable.available}" style="color: green">verfügbar.</strong> + <strong th:if="${not(outputConnectionAvailable.available)}" style="color: red">nicht verfügbar.</strong> + </div> + <div class="connection-display border"> + <img th:src="@{/server.png}" alt="ETL-Processor" /> + <span class="connection" th:classappend="${outputConnectionAvailable.available ? 'available' : ''}"></span> + <img th:if="${mtbFileSender.startsWith('Rest')}" th:src="@{/server.png}" alt="bwHC-Backend" /> + <img th:if="${mtbFileSender.startsWith('Kafka')}" th:src="@{/kafka.png}" alt="Kafka-Broker" /> + <span>ETL-Processor</span> + <span></span> + <span th:if="${mtbFileSender.startsWith('RestBwhc')}">bwHC-Backend</span> + <span th:if="${mtbFileSender.startsWith('RestDip')}">DNPM:DIP-Backend</span> + <span th:if="${mtbFileSender.startsWith('Kafka')}">Kafka-Broker</span> + </div> +</th:block>
\ No newline at end of file diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index be3123b..7ca0b67 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -12,26 +12,30 @@ <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 th:if="${patientPseudonym != null}"> + Betreffend Patienten-Pseudonym <span class="monospace" th:text="${patientPseudonym}">***</span> + <a class="btn btn-blue" th:if="${patientPseudonym != null}" th:href="@{/}">Alle anzeigen</a> </h2> </div> - <div class="border"> - <div th:if="${patientId == null}" class="page-control"> + <div class="border" th:if="${requests.totalElements == 0}"> + <div class="notification info">Noch keine Anfragen eingegangen</div> + </div> + + <div class="border" th:if="${requests.totalElements > 0}"> + <div th:if="${patientPseudonym == 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> + <div th:if="${patientPseudonym != null}" class="page-control"> + <a id="first-page-link" th:href="@{/patient/{patientPseudonym}(patientPseudonym=${patientPseudonym},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/{patientPseudonym}(patientPseudonym=${patientPseudonym},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> + <a id="next-page-link" th:href="@{/patient/{patientPseudonym}(patientPseudonym=${patientPseudonym},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/{patientPseudonym}(patientPseudonym=${patientPseudonym},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> @@ -57,11 +61,11 @@ <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 class="patient-id" th:if="${patientPseudonym != null}" sec:authorize="hasRole('USER') or hasRole('ADMIN')"> + [[ ${request.patientPseudonym} ]] </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 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> </td> <td class="patient-id" sec:authorize="not (hasRole('USER') or hasRole('ADMIN'))">***</td> </tr> diff --git a/src/main/resources/templates/report.html b/src/main/resources/templates/report.html index 07f987c..21d1b48 100644 --- a/src/main/resources/templates/report.html +++ b/src/main/resources/templates/report.html @@ -31,7 +31,7 @@ <td th:style="${request.type.value == 'delete'} ? 'color: red;'"><small>[[ ${request.type} ]]</small></td> <td>[[ ${request.uuid} ]]</td> <td><time th:datetime="${request.processedAt}">[[ ${request.processedAt} ]]</time></td> - <td class="patient-id" sec:authorize="authenticated">[[ ${request.patientId} ]]</td> + <td class="patient-id" sec:authorize="authenticated">[[ ${request.patientPseudonym} ]]</td> <td class="patient-id" sec:authorize="not authenticated">***</td> </tr> </tbody> |
