List runners in queue
This commit is contained in:
parent
c3c597897c
commit
f3d646c8d5
10 changed files with 243 additions and 61 deletions
|
|
@ -1,14 +1,13 @@
|
|||
const COUNT = document.getElementById("count")!;
|
||||
const QUEUE = document.getElementById("queue")!;
|
||||
const INNER = document.getElementById("inner")!;
|
||||
const REFRESH_SECONDS = 10;
|
||||
|
||||
function update() {
|
||||
fetch("table")
|
||||
fetch("inner")
|
||||
.then(response => response.text())
|
||||
.then(text => {
|
||||
QUEUE.innerHTML = text;
|
||||
let count = QUEUE.querySelectorAll("tbody tr").length;
|
||||
COUNT.textContent = String(count);
|
||||
INNER.innerHTML = text;
|
||||
let count = INNER.querySelector<HTMLElement>("#queue")?.dataset["count"]!;
|
||||
document.title = document.title.replace(/^queue \(\d+\)/, `queue (${count})`);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue