[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Ludovic Courtès |
Date: |
Tue, 23 Nov 2021 14:27:05 -0500 (EST) |
branch: master
commit 3f6a819c3dbc510594c5739ad5745f6416425b32
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Nov 23 20:26:08 2021 +0100
templates: Show stop time in history only for completed builds.
* src/cuirass/templates.scm (build-details)[history-table-row]: Show
#:stoptime only when STATUS corresponds to a completed status.
---
src/cuirass/templates.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
index 121fb4c..54dcc2c 100644
--- a/src/cuirass/templates.scm
+++ b/src/cuirass/templates.scm
@@ -658,6 +658,10 @@ the existing SPEC otherwise."
(define status
(assq-ref build #:status))
+ (define completed?
+ (or (= (build-status succeeded) status)
+ (= (build-status failed) status)))
+
`(tr
(td (span (@ (class ,(status-class status))
(title ,(status-title status))
@@ -667,7 +671,9 @@ the existing SPEC otherwise."
(a (@ (href "/build/" ,(assq-ref build #:id) "/details"))
,(assq-ref build #:id)))
(td ,(assq-ref build #:nix-name))
- (td ,(time->string (assq-ref build #:stoptime)))))
+ (td ,(if completed?
+ (time->string (assq-ref build #:stoptime))
+ "—"))))
`((div (@ (class "d-flex flex-row mb-3"))
(div (@ (class "lead mr-auto"))