Added updated to running and waiting jobs
This commit is contained in:
parent
c2b01c8961
commit
9a52262e2b
@ -112,11 +112,11 @@
|
|||||||
</viewport>
|
</viewport>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<div onclick="ShowTasksQueue();">
|
<div onclick="ShowJobQueue();">
|
||||||
<img src="media/running.svg" alt="running"><div id="tasksRunningTag">0</div>
|
<img src="media/running.svg" alt="running"><div id="jobsRunningTag">0</div>
|
||||||
</div>
|
</div>
|
||||||
<div onclick="ShowTasksQueue();">
|
<div onclick="ShowJobQueue();">
|
||||||
<img src="media/queue.svg" alt="queue"><div id="tasksQueuedTag">0</div>
|
<img src="media/queue.svg" alt="queue"><div id="jobsQueuedTag">0</div>
|
||||||
</div>
|
</div>
|
||||||
<p id="madeWith">Made with Blåhaj 🦈</p>
|
<p id="madeWith">Made with Blåhaj 🦈</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -39,6 +39,8 @@ const newMangaPopup = document.querySelector("#newMangaPopup");
|
|||||||
const newMangaConnector = document.querySelector("#newMangaConnector");
|
const newMangaConnector = document.querySelector("#newMangaConnector");
|
||||||
const newMangaTitle = document.querySelector("#newMangaTitle");
|
const newMangaTitle = document.querySelector("#newMangaTitle");
|
||||||
const newMangaResult = document.querySelector("#newMangaResult");
|
const newMangaResult = document.querySelector("#newMangaResult");
|
||||||
|
const jobsRunningTag = document.querySelector("#jobsRunningTag");
|
||||||
|
const jobsQueuedTag = document.querySelector("#jobsQueuedTag");
|
||||||
|
|
||||||
function Setup(){
|
function Setup(){
|
||||||
GetAvailableNotificationConnectors().then((json) => {
|
GetAvailableNotificationConnectors().then((json) => {
|
||||||
@ -343,7 +345,7 @@ setInterval(() => {
|
|||||||
function UpdateJobs(){
|
function UpdateJobs(){
|
||||||
GetMonitorJobs().then((json) => {
|
GetMonitorJobs().then((json) => {
|
||||||
ResetContent();
|
ResetContent();
|
||||||
console.log(json);
|
//console.log(json);
|
||||||
json.forEach(job => {
|
json.forEach(job => {
|
||||||
var mangaView = CreateManga(job.manga, job.mangaConnector.name);
|
var mangaView = CreateManga(job.manga, job.mangaConnector.name);
|
||||||
mangaView.addEventListener("click", (event) => {
|
mangaView.addEventListener("click", (event) => {
|
||||||
@ -352,4 +354,16 @@ function UpdateJobs(){
|
|||||||
tasksContent.appendChild(mangaView);
|
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;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user