Break down the build stats by build server

This commit is contained in:
Christopher Baines 2019-12-14 20:17:53 +00:00
parent 6e9b07bc4a
commit 633e757fe8
3 changed files with 39 additions and 10 deletions

View file

@ -80,7 +80,10 @@
((id url lookup-all-derivations)
(cons url id)))
(select-build-servers conn))
(select-build-stats conn)
(select-build-stats
conn
(assq-ref parsed-query-parameters
'build_server))
(select-builds-with-context
conn
(assq-ref parsed-query-parameters

View file

@ -42,14 +42,22 @@
(thead
(tr
(th (@ (class "col-md-2")) "Status")
(th (@ (class "col-md-2")) "Count")))
,@(map (match-lambda
((url . id)
`(th (@ (class "col-md-2"))
,url)))
build-server-options)))
(tbody
,@(map
(match-lambda
((status count)
((status counts-by-build-server-id)
`(tr
(td ,(build-status-span status))
(td ,count))))
,@(map (lambda (id)
`(td ,(or (assq-ref counts-by-build-server-id
id)
0)))
(map cdr build-server-options)))))
stats)))))
(div
(@ (class "row"))