aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/web/build
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-12-14 20:17:53 +0000
committerChristopher Baines <mail@cbaines.net>2019-12-14 20:17:53 +0000
commit633e757fe8668d88c0cf7bd43cf7a528003374a0 (patch)
tree112ef335f473136946558d707df4be20894608a7 /guix-data-service/web/build
parent6e9b07bc4a39ff0b32f1226184ed5853cc0d5fdb (diff)
downloaddata-service-633e757fe8668d88c0cf7bd43cf7a528003374a0.tar
data-service-633e757fe8668d88c0cf7bd43cf7a528003374a0.tar.gz
Break down the build stats by build server
Diffstat (limited to 'guix-data-service/web/build')
-rw-r--r--guix-data-service/web/build/controller.scm5
-rw-r--r--guix-data-service/web/build/html.scm14
2 files changed, 15 insertions, 4 deletions
diff --git a/guix-data-service/web/build/controller.scm b/guix-data-service/web/build/controller.scm
index afa8de9..e7d1399 100644
--- a/guix-data-service/web/build/controller.scm
+++ b/guix-data-service/web/build/controller.scm
@@ -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
diff --git a/guix-data-service/web/build/html.scm b/guix-data-service/web/build/html.scm
index a0956b0..f5ac6dc 100644
--- a/guix-data-service/web/build/html.scm
+++ b/guix-data-service/web/build/html.scm
@@ -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"))