[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/06: Allow filtering by substitute availability for derivation outputs
From: |
Christopher Baines |
Subject: |
04/06: Allow filtering by substitute availability for derivation outputs |
Date: |
Sun, 3 May 2020 16:30:02 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository data-service.
commit 6d3e8660bdf04c80ad55f5cdb873bbd4fd37ceea
Author: Christopher Baines <address@hidden>
AuthorDate: Sun May 3 21:22:36 2020 +0100
Allow filtering by substitute availability for derivation outputs
---
guix-data-service/web/revision/controller.scm | 8 ++++++++
guix-data-service/web/revision/html.scm | 16 ++++++++++++++++
2 files changed, 24 insertions(+)
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")
- branch master updated (b4111af -> 2e3276e), Christopher Baines, 2020/05/03
- 01/06: Split out querying of build servers and substitute servers, Christopher Baines, 2020/05/03
- 03/06: Add a couple of options to select-derivation-outputs-in-revision, Christopher Baines, 2020/05/03
- 02/06: Rename render-revision-derivation-outputs, Christopher Baines, 2020/05/03
- 04/06: Allow filtering by substitute availability for derivation outputs,
Christopher Baines <=
- 05/06: Add a new package substitute availability page, Christopher Baines, 2020/05/03
- 06/06: Tweak select-output-consistency-for-revision, Christopher Baines, 2020/05/03