From 7a94b193266338de2cd0a452eaf5b52f536fd20c Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Mon, 18 Nov 2019 11:21:40 +0100 Subject: [PATCH] Fix wrong job additions --- app/static/js/JobList.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/static/js/JobList.js b/app/static/js/JobList.js index e3533171..d8c71d40 100644 --- a/app/static/js/JobList.js +++ b/app/static/js/JobList.js @@ -25,7 +25,7 @@ class JobList extends List { switch(operation.op) { case "add": console.log(pathArray); - if (pathArray[1].includes("results")) {break;} + if (pathArray.includes("results")) {break;} this.addJob(operation.value); this.update(); List.updatePagination(this); @@ -80,12 +80,8 @@ class JobList extends List { serviceIcon = JobList.SERVICE_ICONS[job.service] || JobList.SERVICE_ICONS['default']; jobServiceElement = document.createElement("i"); - jobServiceElement.classList.add( - "circle", - "material-icons", - "service-icon", - serviceColor - ); + jobServiceElement.classList.add("circle", "material-icons", "service-icon", + serviceColor); jobServiceElement.innerText = serviceIcon; statusColor = JobList.STATUS_COLORS[job.status] || JobList.STATUS_COLORS['default'];