diff options
Diffstat (limited to 'src/main/resources/templates/index.html')
| -rw-r--r-- | src/main/resources/templates/index.html | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index b1c3142..c039b33 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -9,7 +9,7 @@ <div th:replace="~{fragments.html :: nav}"></div> <main> - <h1>Letzte Anfragen</h1> + <h1>Letzte Anfragen<a id="reload-notify" class="reload" title="Neue Anfragen" th:href="@{/}">⟳</a></h1> <div class="border"> <div class="page-control"> @@ -68,6 +68,12 @@ } }; }); + + const eventSource = new EventSource('statistics/events'); + eventSource.addEventListener('newrequest', event => { + console.log(event); + document.getElementById('reload-notify').style.display = 'inline-flex'; + }); </script> </body> </html>
\ No newline at end of file |
