templates: Do not show “Weather” row when weather is unknown.

* src/cuirass/templates.scm (build-details): Do not emit “Weather” row
when WEATHER is unknown.
This commit is contained in:
Ludovic Courtès 2023-10-18 16:03:07 +02:00
parent 5fbbd26a78
commit e9c27b7ce5
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 9 additions and 7 deletions

View File

@ -774,13 +774,15 @@ the existing SPEC otherwise."
(td ,(if (completed? status)
(time->string (build-completion-time build))
"—")))
(tr (th "Weather")
(td (span (@ (class ,(weather-class weather))
(title ,(weather-title weather))
(aria-hidden "true"))
"")
" " ,(weather-title weather)
,@(build-failure-info build)))
,@(if (= (build-weather unknown) weather)
'()
`((tr (th "Weather")
(td (span (@ (class ,(weather-class weather))
(title ,(weather-title weather))
(aria-hidden "true"))
"")
" " ,(weather-title weather)
,@(build-failure-info build)))))
(tr (th "Log file")
(td ,(if (or (= (build-status started) status)
(= (build-status succeeded) status)