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:
parent
5325cf0234
commit
0d16c87da8
1 changed files with 13 additions and 10 deletions
|
@ -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;"))
|
||||
|
|
Loading…
Reference in a new issue