1
0
mirror of https://github.com/C9Glax/tranga-website.git synced 2025-07-09 14:46:06 +02:00

Added updated to running and waiting jobs

This commit is contained in:
2023-09-02 16:16:29 +02:00
parent c2b01c8961
commit 9a52262e2b
2 changed files with 19 additions and 5 deletions

@ -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;
});
}