aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/web/revision
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-05-03 21:22:36 +0100
committerChristopher Baines <mail@cbaines.net>2020-05-03 21:26:47 +0100
commit6d3e8660bdf04c80ad55f5cdb873bbd4fd37ceea (patch)
tree33cbcfed2455da92a0267211a8df6ceb16584830 /guix-data-service/web/revision
parent3cc14ae03a4f3782cd61756cda772ba5cb4aee4b (diff)
downloaddata-service-6d3e8660bdf04c80ad55f5cdb873bbd4fd37ceea.tar
data-service-6d3e8660bdf04c80ad55f5cdb873bbd4fd37ceea.tar.gz
Allow filtering by substitute availability for derivation outputs
Diffstat (limited to 'guix-data-service/web/revision')
-rw-r--r--guix-data-service/web/revision/controller.scm8
-rw-r--r--guix-data-service/web/revision/html.scm16
2 files changed, 24 insertions, 0 deletions
diff --git a/guix-data-service/web/revision/controller.scm b/guix-data-service/web/revision/controller.scm
index 3ac7cdc..9a253cc 100644
--- a/guix-data-service/web/revision/controller.scm
+++ b/guix-data-service/web/revision/controller.scm
@@ -199,6 +199,10 @@
request
`((search_query ,identity)
(after_path ,identity)
+ (substitutes_available_from ,parse-number
+ #:multi-value)
+ (substitutes_not_available_from ,parse-number
+ #:multi-value)
(output_consistency ,identity
#:default "any")
(system ,parse-system #:default "x86_64-linux")
@@ -849,6 +853,10 @@
conn
commit-hash
#:search-query (assq-ref query-parameters 'search_query)
+ #:nars-from-build-servers
+ (assq-ref query-parameters 'substitutes_available_from)
+ #:no-nars-from-build-servers
+ (assq-ref query-parameters 'substitutes_not_available_from)
#:output-consistency
(assq-ref query-parameters 'output_consistency)
#:system (assq-ref query-parameters 'system)
diff --git a/guix-data-service/web/revision/html.scm b/guix-data-service/web/revision/html.scm
index f92ef99..ebcf645 100644
--- a/guix-data-service/web/revision/html.scm
+++ b/guix-data-service/web/revision/html.scm
@@ -1231,6 +1231,12 @@ figure {
#:key (path-base "/revision/")
header-text
header-link)
+ (define substitute-availability-options
+ (map (match-lambda
+ ((id url)
+ (cons url id)))
+ build-server-urls))
+
(layout
#:body
`(,(header)
@@ -1259,6 +1265,16 @@ figure {
#:help-text
"List outputs where the file name matches this query.")
,(form-horizontal-control
+ "Substitutes available from" query-parameters
+ #:options substitute-availability-options
+ #:help-text ""
+ #:font-family "monospace")
+ ,(form-horizontal-control
+ "Substitutes not available from" query-parameters
+ #:options substitute-availability-options
+ #:help-text ""
+ #:font-family "monospace")
+ ,(form-horizontal-control
"Output consistency" query-parameters
#:allow-selecting-multiple-options #f
#:options '(("Any" . "any")