1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-10 12:16:49 +00:00
webvirtcloud/operations/templates/operations/follow_active.html
catborise aabce6b037 fix(operations): the Jobs pages refresh while a job is active
The list and the detail page were rendered once, so a job that finished
kept showing running until the page was reloaded by hand. While a shown
job is queued, running or cancelling, the page now reloads every five
seconds (not while hidden or while a form field has focus).
2026-10-15 09:28:43 +03:00

8 lines
302 B
HTML

{# Reloads the page while it shows an active job, so the page follows the job to its end. #}
<script id="follow-active-jobs">
setInterval(function () {
if (!document.hidden && !document.querySelector("form :focus")) {
window.location.reload();
}
}, 5000);
</script>