dannym pushed a commit to branch master in repository maintenance. commit daafaf17334314108e1b19aa4303a5b85a4e61b1 Author: Danny Milosavljevic <dan...@scratchpost.org> Date: Thu Feb 8 19:22:35 2018 +0100
hydra: status: Handle jobset list. * hydra/nginx/html/status/index.html (startJobsetsrequest): Handle jobset list. --- hydra/nginx/html/status/index.html | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/hydra/nginx/html/status/index.html b/hydra/nginx/html/status/index.html index c22f1fa..138b662 100644 --- a/hydra/nginx/html/status/index.html +++ b/hydra/nginx/html/status/index.html @@ -535,20 +535,21 @@ function startJobsetsrequest() { startRequest(URLPREFIX + "jobsets?nr=100", function(response) { let projectelement = document.getElementById("project"); let jobsetelement = document.getElementById("jobset"); - systems = []; - let row = response; // pretty sure cuirass has a bug here. - let project = row.name; - let jobset = row.branch; - let xsystems = row.arguments.systems; - - systems = systems.concat(xsystems.filter(function (item) { - return systems.indexOf(item) == -1; - })); - if (!isOptionPresent(projectelement, project)) - projectelement.appendChild(createOption(project)); - if (!isOptionPresent(jobsetelement, jobset)) - jobsetelement.appendChild(createOption(jobset)); + systems = []; + Array.prototype.forEach.call(response, function(row) { + let project = row.name; + let jobset = row.branch; + let xsystems = row.arguments.systems ? row.arguments.systems : []; + + systems = systems.concat(xsystems.filter(function (item) { + return systems.indexOf(item) == -1; + })); + if (!isOptionPresent(projectelement, project)) + projectelement.appendChild(createOption(project)); + if (!isOptionPresent(jobsetelement, jobset)) + jobsetelement.appendChild(createOption(jobset)); + }); // The global systems are now correct, so install these filters only now. installBuildfilter2('latestbuilds', latestbuildsfilters);