guix-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Ludovic Courtès
Date: Wed, 23 Aug 2023 17:09:10 -0400 (EDT)

branch: master
commit a3ea940eb883093ff64fb2c84e988876589209fa
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Aug 23 22:16:08 2023 +0200

    templates: Total number of builds links to evaluation dashboard.
    
    * src/cuirass/templates.scm (evaluation-badges)[dashboard-link]: New
    procedure.
    Use it as the link for absolute numbers.
---
 src/cuirass/templates.scm | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
index 222d826..af43009 100644
--- a/src/cuirass/templates.scm
+++ b/src/cuirass/templates.scm
@@ -883,6 +883,11 @@ the existing SPEC otherwise."
     (if (string=? changes "") '(em "None") changes)))
 
 (define (evaluation-badges evaluation absolute)
+  (define (dashboard-link body)
+    `(a (@ (href "/eval/" ,(build-summary-evaluation-id evaluation)
+                 "/dashboard"))
+        ,body))
+
   (let ((status (build-summary-status evaluation)))
     (if (= status (evaluation-status started))
         '((em "In progress…"))
@@ -904,18 +909,21 @@ the existing SPEC otherwise."
          ((= status (evaluation-status succeeded))
           `((div
              (@ (class "job-abs d-none"))
-             ,(successful-build-badge
-               (if absolute
-                   (evaluation-summary-succeeded absolute)
-                   0))
-             ,(failed-build-badge
-               (if absolute
-                   (evaluation-summary-failed absolute)
-                   0))
-             ,(scheduled-build-badge
-               (if absolute
-                   (evaluation-summary-scheduled absolute)
-                   0)))
+             ,(dashboard-link
+               (successful-build-badge
+                (if absolute
+                    (evaluation-summary-succeeded absolute)
+                    0)))
+             ,(dashboard-link
+               (failed-build-badge
+                (if absolute
+                    (evaluation-summary-failed absolute)
+                    0)))
+             ,(dashboard-link
+               (scheduled-build-badge
+                (if absolute
+                    (evaluation-summary-scheduled absolute)
+                    0))))
             (div
              (@ (class "job-rel"))
              ,(successful-build-badge (build-summary-succeeded evaluation)



reply via email to

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