Skip to content

Commit

Permalink
Limit fetches to every 5s (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Oct 12, 2020
1 parent e6da7dc commit a3cafb3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rootfs/usr/share/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,16 @@ <h3>While waiting, some suggestions:</h3>
}

function scheduleFetchLogs() {
setTimeout(fetchLogs, 1000);
setTimeout(fetchLogs, 5000);
}

scheduleTry();
scheduleFetchLogs();
fetchLogs();

document.getElementById("log").addEventListener("click", function (event) {
const log = event.currentTarget
log.showFull = !log.showFull
fetchLogs()
});
</script>
</body>
Expand Down

0 comments on commit a3cafb3

Please sign in to comment.