From 9a52262e2b5cfac74a8b5d45e8a052ebf5b6d9bc Mon Sep 17 00:00:00 2001 From: glax Date: Sat, 2 Sep 2023 16:16:29 +0200 Subject: [PATCH] Added updated to running and waiting jobs --- Website/index.html | 8 ++++---- Website/interaction.js | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Website/index.html b/Website/index.html index cbe69c1..244ebcd 100644 --- a/Website/index.html +++ b/Website/index.html @@ -112,11 +112,11 @@ diff --git a/Website/interaction.js b/Website/interaction.js index 6cc3604..5a29c5e 100644 --- a/Website/interaction.js +++ b/Website/interaction.js @@ -39,6 +39,8 @@ const newMangaPopup = document.querySelector("#newMangaPopup"); const newMangaConnector = document.querySelector("#newMangaConnector"); const newMangaTitle = document.querySelector("#newMangaTitle"); const newMangaResult = document.querySelector("#newMangaResult"); +const jobsRunningTag = document.querySelector("#jobsRunningTag"); +const jobsQueuedTag = document.querySelector("#jobsQueuedTag"); function Setup(){ GetAvailableNotificationConnectors().then((json) => { @@ -343,7 +345,7 @@ setInterval(() => { function UpdateJobs(){ GetMonitorJobs().then((json) => { ResetContent(); - console.log(json); + //console.log(json); json.forEach(job => { var mangaView = CreateManga(job.manga, job.mangaConnector.name); mangaView.addEventListener("click", (event) => { @@ -352,4 +354,16 @@ function UpdateJobs(){ tasksContent.appendChild(mangaView); }); }); + + GetRunningJobs().then((json) => { + console.log("Running"); + console.log(json); + jobsRunningTag.innerText = json.length; + }); + + GetWaitingJobs().then((json) => { + console.log("Waiting"); + console.log(json); + jobsQueuedTag.innerText = json.length; + }); }