[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Ludovic Courtès |
Date: |
Wed, 7 Nov 2018 09:28:24 -0500 (EST) |
branch: master
commit 2d7b703197bd1e64aa6908eb9044128d705d31b0
Author: Ludovic Courtès <address@hidden>
Date: Wed Nov 7 14:42:42 2018 +0100
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.
---
src/cuirass/templates.scm | 13 +++++++++----
1 file 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
- master updated (6b7f456 -> 0b40dca), Ludovic Courtès, 2018/11/07
- [no subject], Ludovic Courtès, 2018/11/07
- [no subject], Ludovic Courtès, 2018/11/07
- [no subject], Ludovic Courtès, 2018/11/07
- [no subject], Ludovic Courtès, 2018/11/07
- [no subject],
Ludovic Courtès <=
- [no subject], Ludovic Courtès, 2018/11/07
- [no subject], Ludovic Courtès, 2018/11/07
- [no subject], Ludovic Courtès, 2018/11/07
- [no subject], Ludovic Courtès, 2018/11/07
- [no subject], Ludovic Courtès, 2018/11/07
- [no subject], Ludovic Courtès, 2018/11/07
- [no subject], Ludovic Courtès, 2018/11/07
- [no subject], Ludovic Courtès, 2018/11/07
- [no subject], Ludovic Courtès, 2018/11/07
- [no subject], Ludovic Courtès, 2018/11/07