add auto-refresh to dashboard + fix bug
selected "tab"/"button" is now properly highlighted dashboard refreshes every 30 seconds
This commit is contained in:
parent
0c678d8988
commit
c047ec94ac
|
@ -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();
|
||||
}
|
|
@ -110,10 +110,11 @@
|
|||
</body>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById("defaultOpen").click();
|
||||
setTimeout(refreshPage, 30 * 1000);
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById("defaultOpen").click();
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue