summaryrefslogtreecommitdiff
path: root/src/main/resources
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2024-01-17 14:32:42 +0100
committerPaul-Christian Volkmer2024-01-17 14:32:42 +0100
commit531a8589db2bf170e6272602ccb4a3c4457186d8 (patch)
tree0a83a277b70ca8d30d61941d30002301a788bfd1 /src/main/resources
parentfa89a64ddd710f1a0086065b56496bdabf11f0f8 (diff)
feat: push connection available state to client
Diffstat (limited to 'src/main/resources')
-rw-r--r--src/main/resources/templates/configs.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/resources/templates/configs.html b/src/main/resources/templates/configs.html
index 1d6dd20..3c3d744 100644
--- a/src/main/resources/templates/configs.html
+++ b/src/main/resources/templates/configs.html
@@ -37,7 +37,10 @@
</table>
</section>
- <section th:insert="~{configs/connectionAvailable.html}" th:hx-get="@{/configs?connectionAvailable}" hx-trigger="every 20s"></section>
+ <section hx-ext="sse" th:sse-connect="@{/configs/events}">
+ <div th:insert="~{configs/connectionAvailable.html}" th:hx-get="@{/configs?connectionAvailable}" hx-trigger="sse:connection-available">
+ </div>
+ </section>
<section>
<h2><span th:if="${not transformations.isEmpty()}">✅</span><span th:if="${transformations.isEmpty()}">⛔</span> Transformationen</h2>
@@ -84,5 +87,6 @@
</section>
</main>
<script th:src="@{/webjars/htmx.org/dist/htmx.min.js}"></script>
+ <script th:src="@{/webjars/htmx.org/dist/ext/sse.js}"></script>
</body>
</html> \ No newline at end of file