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)))))
|
"View build on " ,build-server-url)))))
|
||||||
builds))))))))
|
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)
|
(define (build-status-span status)
|
||||||
`(span (@ (class ,(string-append
|
`(span (@ (class ,(string-append
|
||||||
"label label-"
|
"label label-"
|
||||||
|
|
@ -384,16 +396,7 @@
|
||||||
("" . "default"))
|
("" . "default"))
|
||||||
status)))
|
status)))
|
||||||
(style "display: inline-block; font-size: 1.2em; margin-top: 0.4em;"))
|
(style "display: inline-block; font-size: 1.2em; margin-top: 0.4em;"))
|
||||||
,(assoc-ref
|
,(build-status-value->display-string status)))
|
||||||
'(("scheduled" . "Scheduled")
|
|
||||||
("started" . "Started")
|
|
||||||
("succeeded" . "Succeeded")
|
|
||||||
("failed" . "Failed")
|
|
||||||
("failed-dependency" . "Failed (dependency)")
|
|
||||||
("failed-other" . "Failed (other)")
|
|
||||||
("canceled" . "Canceled")
|
|
||||||
("" . "Unknown"))
|
|
||||||
status)))
|
|
||||||
|
|
||||||
(define (display-store-item-short item)
|
(define (display-store-item-short item)
|
||||||
`((span (@ (style "font-size: small; font-family: monospace; display: block;"))
|
`((span (@ (style "font-size: small; font-family: monospace; display: block;"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue