[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:23 -0500 (EST) |
branch: master
commit fd7dca655f1444556a5d68658af0b0a111490f1d
Author: Ludovic Courtès <address@hidden>
Date: Wed Nov 7 14:17:50 2018 +0100
templates: Display a finish time only for completed builds.
* src/cuirass/templates.scm (build-eval-table): Display a finish time
only when STATUS is 'succeeded' or 'failed'.
---
src/cuirass/templates.scm | 61 +++++++++++++++++++++++++----------------------
1 file changed, 33 insertions(+), 28 deletions(-)
diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
index 902a70d..119b5fb 100644
--- a/src/cuirass/templates.scm
+++ b/src/cuirass/templates.scm
@@ -198,37 +198,42 @@ and BUILD-MAX are global minimal and maximal (stoptime,
rowid) pairs."
(th (@ (scope "col")) Log))))
(define (table-row build)
+ (define status
+ (assq-ref build #:buildstatus))
+
`(tr
- (td ,(let ((status (assq-ref build #:buildstatus)))
- (cond
- ((= (build-status succeeded) status)
- `(span (@ (class "oi oi-check text-success")
- (title "Succeeded")
- (aria-hidden "true"))
- ""))
- ((= (build-status scheduled) status)
- `(span (@ (class "oi oi-clock text-warning")
- (title "Scheduled")
- (aria-hidden "true"))
- ""))
- ((= (build-status canceled) status)
- `(span (@ (class "oi oi-question-mark text-warning")
- (title "Canceled")
- (aria-hidden "true"))
- ""))
- ((= (build-status failed-dependency) status)
- `(span (@ (class "oi oi-warning text-danger")
- (title "Dependency failed")
- (aria-hidden "true"))
- ""))
- (else
- `(span (@ (class "oi oi-x text-danger")
- (title "Failed")
- (aria-hidden "true"))
- "")))))
+ (td ,(cond
+ ((= (build-status succeeded) status)
+ `(span (@ (class "oi oi-check text-success")
+ (title "Succeeded")
+ (aria-hidden "true"))
+ ""))
+ ((= (build-status scheduled) status)
+ `(span (@ (class "oi oi-clock text-warning")
+ (title "Scheduled")
+ (aria-hidden "true"))
+ ""))
+ ((= (build-status canceled) status)
+ `(span (@ (class "oi oi-question-mark text-warning")
+ (title "Canceled")
+ (aria-hidden "true"))
+ ""))
+ ((= (build-status failed-dependency) status)
+ `(span (@ (class "oi oi-warning text-danger")
+ (title "Dependency failed")
+ (aria-hidden "true"))
+ ""))
+ (else
+ `(span (@ (class "oi oi-x text-danger")
+ (title "Failed")
+ (aria-hidden "true"))
+ ""))))
(th (@ (scope "row")),(assq-ref build #:id))
(td ,(assq-ref build #:jobset))
- (td ,(strftime "%c" (localtime (assq-ref build #:stoptime))))
+ (td ,(if (or (= (build-status succeeded) status)
+ (= (build-status failed) status))
+ (strftime "%c" (localtime (assq-ref build #:stoptime)))
+ "—"))
(td ,(assq-ref build #:job))
(td ,(assq-ref build #:nixname))
(td ,(assq-ref build #:system))
- [no subject], (continued)
- [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
- [no subject],
Ludovic Courtès <=
- [no subject], Ludovic Courtès, 2018/11/07
- [no subject], Ludovic Courtès, 2018/11/07