Allow filtering by system and target on the derivation-outputs page
So that this can match up with the package reproducibility page.
This commit is contained in:
parent
e1d1d372ca
commit
4af643136e
3 changed files with 43 additions and 3 deletions
|
|
@ -273,6 +273,8 @@ ORDER BY derivations.file_name
|
||||||
commit-hash
|
commit-hash
|
||||||
#:key
|
#:key
|
||||||
reproducibility-status
|
reproducibility-status
|
||||||
|
system
|
||||||
|
target
|
||||||
limit-results
|
limit-results
|
||||||
after-path)
|
after-path)
|
||||||
(define query
|
(define query
|
||||||
|
|
@ -315,9 +317,22 @@ INNER JOIN packages
|
||||||
ON package_derivations.package_id = packages.id
|
ON package_derivations.package_id = packages.id
|
||||||
WHERE guix_revisions.commit = $1
|
WHERE guix_revisions.commit = $1
|
||||||
"
|
"
|
||||||
(if after-path
|
(let ((criteria
|
||||||
" AND derivation_output_details.path > $2"
|
`(,@(if after-path
|
||||||
"")
|
'(" AND derivation_output_details.path > ")
|
||||||
|
'())
|
||||||
|
,@(if system
|
||||||
|
'(" AND package_derivations.system = ")
|
||||||
|
'())
|
||||||
|
,@(if target
|
||||||
|
'(" AND package_derivations.target = ")
|
||||||
|
'()))))
|
||||||
|
(string-concatenate
|
||||||
|
(map (lambda (query count)
|
||||||
|
(simple-format #f "~A$~A"
|
||||||
|
query count))
|
||||||
|
criteria
|
||||||
|
(iota (length criteria) 2))))
|
||||||
(cond
|
(cond
|
||||||
((string=? reproducibility-status "any")
|
((string=? reproducibility-status "any")
|
||||||
"")
|
"")
|
||||||
|
|
@ -377,6 +392,12 @@ ORDER BY derivation_output_details.path
|
||||||
`(,commit-hash
|
`(,commit-hash
|
||||||
,@(if after-path
|
,@(if after-path
|
||||||
(list after-path)
|
(list after-path)
|
||||||
|
'())
|
||||||
|
,@(if system
|
||||||
|
(list system)
|
||||||
|
'())
|
||||||
|
,@(if target
|
||||||
|
(list target)
|
||||||
'())))))
|
'())))))
|
||||||
|
|
||||||
(define (insert-derivation-outputs conn
|
(define (insert-derivation-outputs conn
|
||||||
|
|
|
||||||
|
|
@ -200,6 +200,8 @@
|
||||||
`((after_path ,identity)
|
`((after_path ,identity)
|
||||||
(reproducibility_status ,identity
|
(reproducibility_status ,identity
|
||||||
#:default "any")
|
#:default "any")
|
||||||
|
(system ,parse-system #:default "x86_64-linux")
|
||||||
|
(target ,parse-system #:default "x86_64-linux")
|
||||||
(limit_results ,parse-result-limit
|
(limit_results ,parse-result-limit
|
||||||
#:no-default-when (all_results)
|
#:no-default-when (all_results)
|
||||||
#:default 10)
|
#:default 10)
|
||||||
|
|
@ -691,6 +693,7 @@
|
||||||
query-parameters
|
query-parameters
|
||||||
'()
|
'()
|
||||||
'()
|
'()
|
||||||
|
'()
|
||||||
#:path-base path-base
|
#:path-base path-base
|
||||||
#:header-text header-text
|
#:header-text header-text
|
||||||
#:header-link header-link))))
|
#:header-link header-link))))
|
||||||
|
|
@ -704,6 +707,8 @@
|
||||||
commit-hash
|
commit-hash
|
||||||
#:reproducibility-status
|
#:reproducibility-status
|
||||||
(assq-ref query-parameters 'reproducibility_status)
|
(assq-ref query-parameters 'reproducibility_status)
|
||||||
|
#:system (assq-ref query-parameters 'system)
|
||||||
|
#:target (assq-ref query-parameters 'target)
|
||||||
#:limit-results limit-results
|
#:limit-results limit-results
|
||||||
#:after-path (assq-ref query-parameters 'after_path)))
|
#:after-path (assq-ref query-parameters 'after_path)))
|
||||||
(build-server-urls
|
(build-server-urls
|
||||||
|
|
@ -729,6 +734,7 @@
|
||||||
query-parameters
|
query-parameters
|
||||||
derivation-outputs
|
derivation-outputs
|
||||||
build-server-urls
|
build-server-urls
|
||||||
|
(valid-systems conn)
|
||||||
show-next-page?
|
show-next-page?
|
||||||
#:path-base path-base
|
#:path-base path-base
|
||||||
#:header-text header-text
|
#:header-text header-text
|
||||||
|
|
|
||||||
|
|
@ -987,6 +987,7 @@ figure {
|
||||||
query-parameters
|
query-parameters
|
||||||
derivation-outputs
|
derivation-outputs
|
||||||
build-server-urls
|
build-server-urls
|
||||||
|
valid-systems
|
||||||
show-next-page?
|
show-next-page?
|
||||||
#:key (path-base "/revision/")
|
#:key (path-base "/revision/")
|
||||||
header-text
|
header-text
|
||||||
|
|
@ -1027,6 +1028,18 @@ figure {
|
||||||
("Reproducible" . "reproducible")
|
("Reproducible" . "reproducible")
|
||||||
("Unreproducible" . "unreproducible"))
|
("Unreproducible" . "unreproducible"))
|
||||||
#:help-text "Do the known hashes for this output suggest it's reproducible, or not reproducible.")
|
#:help-text "Do the known hashes for this output suggest it's reproducible, or not reproducible.")
|
||||||
|
,(form-horizontal-control
|
||||||
|
"System" query-parameters
|
||||||
|
#:options valid-systems
|
||||||
|
#:allow-selecting-multiple-options #f
|
||||||
|
#:help-text "Only include derivations for this system."
|
||||||
|
#:font-family "monospace")
|
||||||
|
,(form-horizontal-control
|
||||||
|
"Target" query-parameters
|
||||||
|
#:options valid-systems
|
||||||
|
#:allow-selecting-multiple-options #f
|
||||||
|
#:help-text "Only include derivations that are build for this system."
|
||||||
|
#:font-family "monospace")
|
||||||
,(form-horizontal-control
|
,(form-horizontal-control
|
||||||
"After path" query-parameters
|
"After path" query-parameters
|
||||||
#:help-text
|
#:help-text
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue