aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/web/revision
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-12-09 19:07:42 +0000
committerChristopher Baines <mail@cbaines.net>2020-12-09 19:07:42 +0000
commit69057b41a793e06ab2b6234050dae15c57a694b1 (patch)
tree3748290250fea37758d579128f32a6858882b615 /guix-data-service/web/revision
parentba511d73b02947b2c10aeff5dc36d7c166afc6ed (diff)
downloaddata-service-69057b41a793e06ab2b6234050dae15c57a694b1.tar
data-service-69057b41a793e06ab2b6234050dae15c57a694b1.tar.gz
Support showing package derivations by build status
I'm particularly thinking about listing packages which fail to build.
Diffstat (limited to 'guix-data-service/web/revision')
-rw-r--r--guix-data-service/web/revision/controller.scm7
-rw-r--r--guix-data-service/web/revision/html.scm11
2 files changed, 18 insertions, 0 deletions
diff --git a/guix-data-service/web/revision/controller.scm b/guix-data-service/web/revision/controller.scm
index 67369af..8dc75a8 100644
--- a/guix-data-service/web/revision/controller.scm
+++ b/guix-data-service/web/revision/controller.scm
@@ -203,6 +203,7 @@
(target ,parse-target #:multi-value)
(maximum_builds ,parse-number)
(minimum_builds ,parse-number)
+ (build_status ,parse-derivation-build-status)
(field ,identity #:multi-value
#:default ("system" "target" "builds"))
(after_name ,identity)
@@ -989,6 +990,9 @@
#:targets (assq-ref query-parameters 'target)
#:maximum-builds (assq-ref query-parameters 'maximum_builds)
#:minimum-builds (assq-ref query-parameters 'minimum_builds)
+ #:build-status (and=> (assq-ref query-parameters
+ 'build_status)
+ string->symbol)
#:limit-results limit-results
#:after-name (assq-ref query-parameters 'after_name)
#:include-builds? (member "builds" fields))
@@ -999,6 +1003,9 @@
#:targets (assq-ref query-parameters 'target)
#:maximum-builds (assq-ref query-parameters 'maximum_builds)
#:minimum-builds (assq-ref query-parameters 'minimum_builds)
+ #:build-status (and=> (assq-ref query-parameters
+ 'build_status)
+ string->symbol)
#:limit-results limit-results
#:after-name (assq-ref query-parameters 'after_name)
#:include-builds? (member "builds" fields))))))
diff --git a/guix-data-service/web/revision/html.scm b/guix-data-service/web/revision/html.scm
index 0e7a389..58f1bb1 100644
--- a/guix-data-service/web/revision/html.scm
+++ b/guix-data-service/web/revision/html.scm
@@ -1502,6 +1502,12 @@ figure {
#:key (path-base "/revision/")
header-text
header-link)
+ (define derivation-build-status-options
+ '(("" . "none")
+ ("Working" . "working")
+ ("Failing" . "failing")
+ ("Unknown" . "unknown")))
+
(define field-options
(map
(lambda (field)
@@ -1557,6 +1563,11 @@ figure {
"Maximum builds" query-parameters
#:help-text "Only show derivations with a maximum number of known builds.")
,(form-horizontal-control
+ "Build status" query-parameters
+ #:allow-selecting-multiple-options #f
+ #:options derivation-build-status-options
+ #:help-text "Only show derivations with this overall build status.")
+ ,(form-horizontal-control
"Fields" query-parameters
#:name "field"
#:options field-options