summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-02-23 23:26:19 +0100
committerLudovic Courtès <ludo@gnu.org>2020-02-24 00:09:22 +0100
commit1f5e5796ef4a34c273191af5ec773f94736d5063 (patch)
treef85b822a8606c4001f8a3e845de6f737b97ca286
parented0f905cc709dc7c89aac4ba1104a863459fbd3f (diff)
downloadcuirass-1f5e5796ef4a34c273191af5ec773f94736d5063.tar
cuirass-1f5e5796ef4a34c273191af5ec773f94736d5063.tar.gz
templates: Build page links to corresponding evaluation.
* src/cuirass/templates.scm (build-details): Define 'evaluation'. Add "Evaluation" row with a link to EVALUATION.
-rw-r--r--src/cuirass/templates.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
index 7477191..3f7647d 100644
--- a/src/cuirass/templates.scm
+++ b/src/cuirass/templates.scm
@@ -1,6 +1,6 @@
;;; templates.scm -- HTTP API
;;; Copyright © 2018 Tatiana Sholokhova <tanja201396@gmail.com>
-;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of Cuirass.
@@ -204,15 +204,24 @@
store (list (derivation-input drv))
#:substitutable-info (const #f))))))
'()))
+
(define completed?
(or (= (build-status succeeded) status)
(= (build-status failed) status)))
+
+ (define evaluation
+ (assq-ref build #:eval-id))
+
`((p (@ (class "lead")) "Build details")
(table
(@ (class "table table-sm table-hover"))
(tbody
(tr (th "Build ID")
(td ,(assq-ref build #:id)))
+ (tr (th "Evaluation")
+ (td (a (@ (href ,(string-append "/eval/"
+ (number->string evaluation))))
+ ,(number->string evaluation))))
(tr (th "Status")
(td (span (@ (class ,(status-class status))
(title ,(status-title status)))