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
|
// Show the current tab, and add an "active" class to the button that opened the tab
|
||||||
document.getElementById(tabName).style.display = "block";
|
document.getElementById(tabName).style.display = "block";
|
||||||
evt.currentTarget.className += " active";
|
event.currentTarget.className += " active";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function refreshPage() {
|
||||||
|
window.location.reload();
|
||||||
|
}
|
|
@ -110,10 +110,11 @@
|
||||||
</body>
|
</body>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.getElementById("defaultOpen").click();
|
||||||
|
setTimeout(refreshPage, 30 * 1000);
|
||||||
|
</script>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
|
||||||
document.getElementById("defaultOpen").click();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue