aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cuirass/templates.scm41
1 files changed, 28 insertions, 13 deletions
diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
index d4968d7..902a70d 100644
--- a/src/cuirass/templates.scm
+++ b/src/cuirass/templates.scm
@@ -21,6 +21,7 @@
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
+ #:use-module ((cuirass database) #:select (build-status))
#:export (html-page
specifications-table
evaluation-info-table
@@ -198,19 +199,33 @@ and BUILD-MAX are global minimal and maximal (stoptime, rowid) pairs."
(define (table-row build)
`(tr
- (td ,(case (assq-ref build #:buildstatus)
- ((0) `(span (@ (class "oi oi-check text-success")
- (title "Succeeded")
- (aria-hidden "true"))
- ""))
- ((1 2 3 4) `(span (@ (class "oi oi-x text-danger")
- (title "Failed")
- (aria-hidden "true"))
- ""))
- (else `(span (@ (class "oi oi-clock text-warning")
- (title "Scheduled")
- (aria-hidden "true"))
- ""))))
+ (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"))
+ "")))))
(th (@ (scope "row")),(assq-ref build #:id))
(td ,(assq-ref build #:jobset))
(td ,(strftime "%c" (localtime (assq-ref build #:stoptime))))