guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: hydra: status: Handle jobset list.


From: Danny Milosavljevic
Subject: 02/02: hydra: status: Handle jobset list.
Date: Thu, 8 Feb 2018 13:27:42 -0500 (EST)

dannym pushed a commit to branch master
in repository maintenance.

commit daafaf17334314108e1b19aa4303a5b85a4e61b1
Author: Danny Milosavljevic <address@hidden>
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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]