2
0
Fork 0
mirror of git://git.savannah.gnu.org/guix/data-service.git synced 2023-12-14 03:23:03 +01:00

Add build-status-value->display-string

This commit is contained in:
Christopher Baines 2019-03-17 22:43:07 +00:00
parent 5325cf0234
commit 0d16c87da8
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -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;"))