Add task status to tasks page

This commit is contained in:
rubenwardy
2025-04-27 17:09:26 +01:00
parent 1543965e5f
commit 4011cc56b6
3 changed files with 11 additions and 2 deletions

View File

@@ -42,6 +42,14 @@ async function pollTask(poll_url, disableTimeout) {
console.error(e);
}
if (res && res.status) {
let status = res.status.toLowerCase();
if (status === "pending") {
status = "pending or unknown";
}
document.getElementById("status").textContent = `Status: ${status}`;
}
if (res && res.status === "SUCCESS") {
console.log("Got result")
return res.result;