aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-11-07 14:42:42 +0100
committerLudovic Courtès <ludo@gnu.org>2018-11-07 15:28:05 +0100
commit2d7b703197bd1e64aa6908eb9044128d705d31b0 (patch)
tree0d985c83db9390ec9d88009bf10fd7a39cc51461
parenta1d353b1527fd1a2bfa2a1cbb2f0ff5c79d6e973 (diff)
downloadcuirass-2d7b703197bd1e64aa6908eb9044128d705d31b0.tar
cuirass-2d7b703197bd1e64aa6908eb9044128d705d31b0.tar.gz
templates: Add link to build log only for completed builds.
* src/cuirass/templates.scm (build-eval-table)[table-row]: Define 'completed?'. Add link to build log iff COMPLETED? is true.
-rw-r--r--src/cuirass/templates.scm13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
index 1c089a4..27bb51f 100644
--- a/src/cuirass/templates.scm
+++ b/src/cuirass/templates.scm
@@ -234,6 +234,10 @@ and BUILD-MAX are global minimal and maximal (stoptime, rowid) pairs."
(define status
(assq-ref build #:buildstatus))
+ (define completed?
+ (or (= (build-status succeeded) status)
+ (= (build-status failed) status)))
+
`(tr
(td ,(cond
((= (build-status succeeded) status)
@@ -263,15 +267,16 @@ and BUILD-MAX are global minimal and maximal (stoptime, rowid) pairs."
""))))
(th (@ (scope "row")),(assq-ref build #:id))
(td ,(assq-ref build #:jobset))
- (td ,(if (or (= (build-status succeeded) status)
- (= (build-status failed) status))
+ (td ,(if completed?
(time->string (assq-ref build #:stoptime))
"—"))
(td ,(assq-ref build #:job))
(td ,(assq-ref build #:nixname))
(td ,(assq-ref build #:system))
- (td (a (@ (href "/build/" ,(assq-ref build #:id) "/log/raw"))
- raw))))
+ (td ,(if completed?
+ `(a (@ (href "/build/" ,(assq-ref build #:id) "/log/raw"))
+ "raw")
+ "—"))))
(define (build-id build)
(match build