diff --git a/app/static/js/JobList.js b/app/static/js/JobList.js index d4de1fe0..6715cb00 100644 --- a/app/static/js/JobList.js +++ b/app/static/js/JobList.js @@ -1,11 +1,11 @@ class JobList extends List { - constructor(idOrElement, options) { + constructor(idOrElement, subscriberList, options) { super(idOrElement, options); - jobsSubscribers.push(this); + subscriberList.push(this); } - _init() { + _init(jobs) { for (let [id, job] of Object.entries(jobs)) { this.addJob(job); } diff --git a/app/templates/base.html.j2 b/app/templates/base.html.j2 index 8488c8df..6cc41fd7 100644 --- a/app/templates/base.html.j2 +++ b/app/templates/base.html.j2 @@ -39,7 +39,7 @@ var subscriber; jobs = JSON.parse(msg); - for (subscriber of jobsSubscribers) {subscriber._init();} + for (subscriber of jobsSubscribers) {subscriber._init(jobs);} }); diff --git a/app/templates/main/dashboard.html.j2 b/app/templates/main/dashboard.html.j2 index 625b0be6..94bd2426 100644 --- a/app/templates/main/dashboard.html.j2 +++ b/app/templates/main/dashboard.html.j2 @@ -75,7 +75,7 @@