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
|
||||
#:key
|
||||
reproducibility-status
|
||||
system
|
||||
target
|
||||
limit-results
|
||||
after-path)
|
||||
(define query
|
||||
|
|
@ -315,9 +317,22 @@ INNER JOIN packages
|
|||
ON package_derivations.package_id = packages.id
|
||||
WHERE guix_revisions.commit = $1
|
||||
"
|
||||
(if after-path
|
||||
" AND derivation_output_details.path > $2"
|
||||
"")
|
||||
(let ((criteria
|
||||
`(,@(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
|
||||
((string=? reproducibility-status "any")
|
||||
"")
|
||||
|
|
@ -377,6 +392,12 @@ ORDER BY derivation_output_details.path
|
|||
`(,commit-hash
|
||||
,@(if after-path
|
||||
(list after-path)
|
||||
'())
|
||||
,@(if system
|
||||
(list system)
|
||||
'())
|
||||
,@(if target
|
||||
(list target)
|
||||
'())))))
|
||||
|
||||
(define (insert-derivation-outputs conn
|
||||
|
|
|
|||
|
|
@ -200,6 +200,8 @@
|
|||
`((after_path ,identity)
|
||||
(reproducibility_status ,identity
|
||||
#:default "any")
|
||||
(system ,parse-system #:default "x86_64-linux")
|
||||
(target ,parse-system #:default "x86_64-linux")
|
||||
(limit_results ,parse-result-limit
|
||||
#:no-default-when (all_results)
|
||||
#:default 10)
|
||||
|
|
@ -691,6 +693,7 @@
|
|||
query-parameters
|
||||
'()
|
||||
'()
|
||||
'()
|
||||
#:path-base path-base
|
||||
#:header-text header-text
|
||||
#:header-link header-link))))
|
||||
|
|
@ -704,6 +707,8 @@
|
|||
commit-hash
|
||||
#:reproducibility-status
|
||||
(assq-ref query-parameters 'reproducibility_status)
|
||||
#:system (assq-ref query-parameters 'system)
|
||||
#:target (assq-ref query-parameters 'target)
|
||||
#:limit-results limit-results
|
||||
#:after-path (assq-ref query-parameters 'after_path)))
|
||||
(build-server-urls
|
||||
|
|
@ -729,6 +734,7 @@
|
|||
query-parameters
|
||||
derivation-outputs
|
||||
build-server-urls
|
||||
(valid-systems conn)
|
||||
show-next-page?
|
||||
#:path-base path-base
|
||||
#:header-text header-text
|
||||
|
|
|
|||
|
|
@ -987,6 +987,7 @@ figure {
|
|||
query-parameters
|
||||
derivation-outputs
|
||||
build-server-urls
|
||||
valid-systems
|
||||
show-next-page?
|
||||
#:key (path-base "/revision/")
|
||||
header-text
|
||||
|
|
@ -1027,6 +1028,18 @@ figure {
|
|||
("Reproducible" . "reproducible")
|
||||
("Unreproducible" . "unreproducible"))
|
||||
#: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
|
||||
"After path" query-parameters
|
||||
#:help-text
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue