diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-11-07 14:17:50 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-11-07 15:28:05 +0100 |
commit | fd7dca655f1444556a5d68658af0b0a111490f1d (patch) | |
tree | 3799baf48251bb29cac7a936cd7a1d2f82e81e7f | |
parent | df2cbfd0ae7671cb22063bb5907e2488512b7b91 (diff) | |
download | cuirass-fd7dca655f1444556a5d68658af0b0a111490f1d.tar cuirass-fd7dca655f1444556a5d68658af0b0a111490f1d.tar.gz |
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'.
-rw-r--r-- | src/cuirass/templates.scm | 61 |
1 files 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)) |