mirror of
https://github.com/pcvolkmer/etl-processor.git
synced 2025-07-01 22:22:53 +00:00
feat #23: add reload button to display on new request
This commit is contained in:
@ -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>
|
Reference in New Issue
Block a user