add auto-refresh to dashboard + fix bug

selected "tab"/"button" is now properly highlighted
dashboard refreshes every 30 seconds
This commit is contained in:
Lili (Tlapka) 2023-01-16 13:30:43 +01:00
parent 0c678d8988
commit c047ec94ac
2 changed files with 11 additions and 6 deletions

View File

@ -15,5 +15,9 @@ function openTab(event, tabName) {
// Show the current tab, and add an "active" class to the button that opened the tab
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " active";
event.currentTarget.className += " active";
}
function refreshPage() {
window.location.reload();
}

View File

@ -110,10 +110,11 @@
</body>
</div>
<script>
document.getElementById("defaultOpen").click();
setTimeout(refreshPage, 30 * 1000);
</script>
</div>
<script>
document.getElementById("defaultOpen").click();
</script>
</html>