mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-10 12:16:49 +00:00
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).
8 lines
302 B
HTML
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>
|