aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-03-17 22:43:07 +0000
committerChristopher Baines <mail@cbaines.net>2019-03-17 22:43:07 +0000
commit0d16c87da89372f6d813a753f309f8e3b0a42e18 (patch)
treee731c29088198f5fe54ad888b36144134493755f
parent5325cf02341fca124de8567e14adc06bcbffd5c2 (diff)
downloaddata-service-0d16c87da89372f6d813a753f309f8e3b0a42e18.tar
data-service-0d16c87da89372f6d813a753f309f8e3b0a42e18.tar.gz
Add build-status-value->display-string
-rw-r--r--guix-data-service/web/view/html.scm23
1 files changed, 13 insertions, 10 deletions
diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm
index 8640774..40d5d74 100644
--- a/guix-data-service/web/view/html.scm
+++ b/guix-data-service/web/view/html.scm
@@ -370,6 +370,18 @@
"View build on " ,build-server-url)))))
builds))))))))
+(define (build-status-value->display-string value)
+ (assoc-ref
+ '(("scheduled" . "Scheduled")
+ ("started" . "Started")
+ ("succeeded" . "Succeeded")
+ ("failed" . "Failed")
+ ("failed-dependency" . "Failed (dependency)")
+ ("failed-other" . "Failed (other)")
+ ("canceled" . "Canceled")
+ ("" . "Unknown"))
+ value))
+
(define (build-status-span status)
`(span (@ (class ,(string-append
"label label-"
@@ -384,16 +396,7 @@
("" . "default"))
status)))
(style "display: inline-block; font-size: 1.2em; margin-top: 0.4em;"))
- ,(assoc-ref
- '(("scheduled" . "Scheduled")
- ("started" . "Started")
- ("succeeded" . "Succeeded")
- ("failed" . "Failed")
- ("failed-dependency" . "Failed (dependency)")
- ("failed-other" . "Failed (other)")
- ("canceled" . "Canceled")
- ("" . "Unknown"))
- status)))
+ ,(build-status-value->display-string status)))
(define (display-store-item-short item)
`((span (@ (style "font-size: small; font-family: monospace; display: block;"))