Improve the compare derivations page
Add support for filtering the results, and add the system and target to the output.
This commit is contained in:
parent
0d16c87da8
commit
189014f3bc
5 changed files with 254 additions and 51 deletions
|
|
@ -98,7 +98,9 @@ ORDER BY base_packages.name DESC, base_packages.version, target_packages.name, t
|
||||||
(select-derivations-by-id conn derivation-ids)))
|
(select-derivations-by-id conn derivation-ids)))
|
||||||
derivation-data))
|
derivation-data))
|
||||||
|
|
||||||
(define (package-data-vhash->derivations-and-build-status conn packages-vhash)
|
(define (package-data-vhash->derivations-and-build-status conn packages-vhash
|
||||||
|
systems targets
|
||||||
|
build-statuses)
|
||||||
(define (vhash->derivation-file-names vhash)
|
(define (vhash->derivation-file-names vhash)
|
||||||
(vhash-fold (lambda (key value result)
|
(vhash-fold (lambda (key value result)
|
||||||
(cons (third value)
|
(cons (third value)
|
||||||
|
|
@ -109,9 +111,12 @@ ORDER BY base_packages.name DESC, base_packages.version, target_packages.name, t
|
||||||
(let* ((derivation-file-names
|
(let* ((derivation-file-names
|
||||||
(vhash->derivation-file-names packages-vhash))
|
(vhash->derivation-file-names packages-vhash))
|
||||||
(derivation-data
|
(derivation-data
|
||||||
(select-derivations-and-build-status-by-file-name
|
(select-derivations-and-build-status
|
||||||
conn
|
conn
|
||||||
derivation-file-names)))
|
#:file-names derivation-file-names
|
||||||
|
#:systems systems
|
||||||
|
#:targets targets
|
||||||
|
#:build-statuses build-statuses)))
|
||||||
derivation-data))
|
derivation-data))
|
||||||
|
|
||||||
(define (package-data-vhash->package-name-and-version-vhash vhash)
|
(define (package-data-vhash->package-name-and-version-vhash vhash)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
(define-module (guix-data-service model build-status)
|
(define-module (guix-data-service model build-status)
|
||||||
#:use-module (squee)
|
#:use-module (squee)
|
||||||
#:export (build-statuses
|
#:export (build-statuses
|
||||||
|
build-status-strings
|
||||||
insert-build-status))
|
insert-build-status))
|
||||||
|
|
||||||
(define build-statuses
|
(define build-statuses
|
||||||
|
|
@ -12,6 +13,9 @@
|
||||||
(3 . "failed-other")
|
(3 . "failed-other")
|
||||||
(4 . "canceled")))
|
(4 . "canceled")))
|
||||||
|
|
||||||
|
(define build-status-strings
|
||||||
|
(map cdr build-statuses))
|
||||||
|
|
||||||
(define (insert-build-status conn internal-build-id
|
(define (insert-build-status conn internal-build-id
|
||||||
starttime stoptime status)
|
starttime stoptime status)
|
||||||
(exec-query conn
|
(exec-query conn
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@
|
||||||
#:use-module (guix memoization)
|
#:use-module (guix memoization)
|
||||||
#:use-module (guix derivations)
|
#:use-module (guix derivations)
|
||||||
#:use-module (guix-data-service model utils)
|
#:use-module (guix-data-service model utils)
|
||||||
#:export (select-derivation-by-file-name
|
#:export (valid-systems
|
||||||
|
select-derivation-by-file-name
|
||||||
select-derivation-outputs-by-derivation-id
|
select-derivation-outputs-by-derivation-id
|
||||||
select-derivation-by-output-filename
|
select-derivation-by-output-filename
|
||||||
select-derivations-using-output
|
select-derivations-using-output
|
||||||
|
|
@ -16,10 +17,16 @@
|
||||||
select-derivation-inputs-by-derivation-id
|
select-derivation-inputs-by-derivation-id
|
||||||
select-existing-derivations
|
select-existing-derivations
|
||||||
select-derivations-by-id
|
select-derivations-by-id
|
||||||
select-derivations-and-build-status-by-file-name
|
select-derivations-and-build-status
|
||||||
insert-into-derivations
|
insert-into-derivations
|
||||||
derivation-file-names->derivation-ids))
|
derivation-file-names->derivation-ids))
|
||||||
|
|
||||||
|
(define (valid-systems conn)
|
||||||
|
(map car
|
||||||
|
(exec-query
|
||||||
|
conn
|
||||||
|
"SELECT DISTINCT system FROM derivations ORDER BY 1")))
|
||||||
|
|
||||||
(define (select-existing-derivations file-names)
|
(define (select-existing-derivations file-names)
|
||||||
(string-append "SELECT id, file_name "
|
(string-append "SELECT id, file_name "
|
||||||
"FROM derivations "
|
"FROM derivations "
|
||||||
|
|
@ -462,11 +469,45 @@ ORDER BY derivations.system DESC,
|
||||||
|
|
||||||
(exec-query conn query))
|
(exec-query conn query))
|
||||||
|
|
||||||
(define (select-derivations-and-build-status-by-file-name conn file-names)
|
(define* (select-derivations-and-build-status conn #:key
|
||||||
|
file-names
|
||||||
|
systems
|
||||||
|
targets
|
||||||
|
build-statuses)
|
||||||
|
(define criteria
|
||||||
|
(string-join
|
||||||
|
(filter-map
|
||||||
|
(lambda (field values)
|
||||||
|
(if (and values (not (null? values)))
|
||||||
|
(string-append
|
||||||
|
field " IN ("
|
||||||
|
(string-join (map (lambda (value)
|
||||||
|
(simple-format #f "'~A'" value))
|
||||||
|
values)
|
||||||
|
",")
|
||||||
|
")")
|
||||||
|
#f))
|
||||||
|
'("derivations.file_name"
|
||||||
|
"derivations.system"
|
||||||
|
"target"
|
||||||
|
"latest_build_status.status")
|
||||||
|
(list file-names
|
||||||
|
systems
|
||||||
|
targets
|
||||||
|
build-statuses))
|
||||||
|
" AND "))
|
||||||
|
|
||||||
(define query
|
(define query
|
||||||
(string-append
|
(string-append
|
||||||
"SELECT derivations.file_name, latest_build_status.status "
|
"SELECT derivations.file_name, derivations.system, ("
|
||||||
|
" SELECT DISTINCT package_derivations.target"
|
||||||
|
" FROM package_derivations"
|
||||||
|
" WHERE derivations.id = package_derivations.derivation_id"
|
||||||
|
") AS target, "
|
||||||
|
"latest_build_status.status "
|
||||||
"FROM derivations "
|
"FROM derivations "
|
||||||
|
"INNER JOIN package_derivations"
|
||||||
|
" ON derivations.id = package_derivations.derivation_id "
|
||||||
"LEFT OUTER JOIN builds ON derivations.id = builds.derivation_id "
|
"LEFT OUTER JOIN builds ON derivations.id = builds.derivation_id "
|
||||||
"LEFT OUTER JOIN "
|
"LEFT OUTER JOIN "
|
||||||
"(SELECT DISTINCT ON (internal_build_id) * "
|
"(SELECT DISTINCT ON (internal_build_id) * "
|
||||||
|
|
@ -474,12 +515,7 @@ ORDER BY derivations.system DESC,
|
||||||
"ORDER BY internal_build_id, status_fetched_at DESC"
|
"ORDER BY internal_build_id, status_fetched_at DESC"
|
||||||
") AS latest_build_status "
|
") AS latest_build_status "
|
||||||
"ON builds.internal_id = latest_build_status.internal_build_id "
|
"ON builds.internal_id = latest_build_status.internal_build_id "
|
||||||
"WHERE derivations.file_name IN "
|
"WHERE " criteria ";"))
|
||||||
"(" (string-join (map (lambda (file-name)
|
|
||||||
(simple-format #f "'~A'" file-name))
|
|
||||||
file-names)
|
|
||||||
",")
|
|
||||||
");"))
|
|
||||||
|
|
||||||
(exec-query conn query))
|
(exec-query conn query))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
#:use-module (guix-data-service model package-derivation)
|
#:use-module (guix-data-service model package-derivation)
|
||||||
#:use-module (guix-data-service model package-metadata)
|
#:use-module (guix-data-service model package-metadata)
|
||||||
#:use-module (guix-data-service model derivation)
|
#:use-module (guix-data-service model derivation)
|
||||||
|
#:use-module (guix-data-service model build-status)
|
||||||
#:use-module (guix-data-service model build)
|
#:use-module (guix-data-service model build)
|
||||||
#:use-module (guix-data-service jobs load-new-guix-revision)
|
#:use-module (guix-data-service jobs load-new-guix-revision)
|
||||||
#:use-module (guix-data-service web render)
|
#:use-module (guix-data-service web render)
|
||||||
|
|
@ -57,17 +58,18 @@
|
||||||
;; (render-html (error-page message))))
|
;; (render-html (error-page message))))
|
||||||
)
|
)
|
||||||
|
|
||||||
(define (with-base-and-target-commits request conn f)
|
(define (assoc-ref-multiple alist key)
|
||||||
(let ((base-commit (-> request
|
(filter-map
|
||||||
request-uri
|
(match-lambda
|
||||||
uri-query
|
((k . value)
|
||||||
parse-query-string
|
(and (string=? k key)
|
||||||
(cut assoc-ref <> "base_commit")))
|
value)))
|
||||||
(target-commit (-> request
|
alist))
|
||||||
request-uri
|
|
||||||
uri-query
|
(define (with-base-and-target-commits query-parameters conn f)
|
||||||
parse-query-string
|
(let* ((base-commit (assoc-ref query-parameters "base_commit"))
|
||||||
(cut assoc-ref <> "target_commit"))))
|
(target-commit (assoc-ref query-parameters "target_commit")))
|
||||||
|
|
||||||
(f base-commit
|
(f base-commit
|
||||||
(commit->revision-id conn base-commit)
|
(commit->revision-id conn base-commit)
|
||||||
target-commit
|
target-commit
|
||||||
|
|
@ -139,11 +141,16 @@
|
||||||
base-commit
|
base-commit
|
||||||
base-revision-id
|
base-revision-id
|
||||||
target-commit
|
target-commit
|
||||||
target-revision-id)
|
target-revision-id
|
||||||
|
systems
|
||||||
|
targets
|
||||||
|
build-statuses)
|
||||||
(define (derivations->alist derivations)
|
(define (derivations->alist derivations)
|
||||||
(map (match-lambda
|
(map (match-lambda
|
||||||
((file-name buildstatus)
|
((file-name system target buildstatus)
|
||||||
`((file_name . ,file-name)
|
`((file_name . ,file-name)
|
||||||
|
(system . ,system)
|
||||||
|
(target . ,target)
|
||||||
(build_status . ,(if (string=? "")
|
(build_status . ,(if (string=? "")
|
||||||
"unknown"
|
"unknown"
|
||||||
buildstatus)))))
|
buildstatus)))))
|
||||||
|
|
@ -158,11 +165,17 @@
|
||||||
(let ((base-derivations
|
(let ((base-derivations
|
||||||
(package-data-vhash->derivations-and-build-status
|
(package-data-vhash->derivations-and-build-status
|
||||||
conn
|
conn
|
||||||
base-packages-vhash))
|
base-packages-vhash
|
||||||
|
systems
|
||||||
|
targets
|
||||||
|
build-statuses))
|
||||||
(target-derivations
|
(target-derivations
|
||||||
(package-data-vhash->derivations-and-build-status
|
(package-data-vhash->derivations-and-build-status
|
||||||
conn
|
conn
|
||||||
target-packages-vhash)))
|
target-packages-vhash
|
||||||
|
systems
|
||||||
|
targets
|
||||||
|
build-statuses)))
|
||||||
(cond
|
(cond
|
||||||
((eq? content-type 'json)
|
((eq? content-type 'json)
|
||||||
(render-json
|
(render-json
|
||||||
|
|
@ -177,10 +190,15 @@
|
||||||
(else
|
(else
|
||||||
(apply render-html
|
(apply render-html
|
||||||
(compare/derivations
|
(compare/derivations
|
||||||
|
(valid-systems conn)
|
||||||
|
build-status-strings
|
||||||
base-commit
|
base-commit
|
||||||
target-commit
|
target-commit
|
||||||
base-derivations
|
base-derivations
|
||||||
target-derivations)))))))
|
target-derivations
|
||||||
|
systems
|
||||||
|
targets
|
||||||
|
build-statuses)))))))
|
||||||
|
|
||||||
(define (render-compare/packages content-type
|
(define (render-compare/packages content-type
|
||||||
conn
|
conn
|
||||||
|
|
@ -260,6 +278,12 @@
|
||||||
derivations)))))))
|
derivations)))))))
|
||||||
|
|
||||||
(define (controller request body conn)
|
(define (controller request body conn)
|
||||||
|
(define query-parameters
|
||||||
|
(-> request
|
||||||
|
request-uri
|
||||||
|
uri-query
|
||||||
|
parse-query-string))
|
||||||
|
|
||||||
(match-lambda
|
(match-lambda
|
||||||
((GET)
|
((GET)
|
||||||
(apply render-html (index
|
(apply render-html (index
|
||||||
|
|
@ -303,7 +327,7 @@
|
||||||
(render-store-item conn (string-append "/gnu/store/" filename))))
|
(render-store-item conn (string-append "/gnu/store/" filename))))
|
||||||
((GET "compare")
|
((GET "compare")
|
||||||
(with-base-and-target-commits
|
(with-base-and-target-commits
|
||||||
request conn
|
query-parameters conn
|
||||||
(lambda (base-commit base-revision-id target-commit target-revision-id)
|
(lambda (base-commit base-revision-id target-commit target-revision-id)
|
||||||
(if (not (and base-revision-id target-revision-id))
|
(if (not (and base-revision-id target-revision-id))
|
||||||
(render-compare-unknown-commit 'html
|
(render-compare-unknown-commit 'html
|
||||||
|
|
@ -320,7 +344,7 @@
|
||||||
target-revision-id)))))
|
target-revision-id)))))
|
||||||
((GET "compare.json")
|
((GET "compare.json")
|
||||||
(with-base-and-target-commits
|
(with-base-and-target-commits
|
||||||
request conn
|
query-parameters conn
|
||||||
(lambda (base-commit base-revision-id target-commit target-revision-id)
|
(lambda (base-commit base-revision-id target-commit target-revision-id)
|
||||||
(if (not (and base-revision-id target-revision-id))
|
(if (not (and base-revision-id target-revision-id))
|
||||||
(render-compare-unknown-commit 'json
|
(render-compare-unknown-commit 'json
|
||||||
|
|
@ -337,7 +361,7 @@
|
||||||
target-revision-id)))))
|
target-revision-id)))))
|
||||||
((GET "compare" "derivations")
|
((GET "compare" "derivations")
|
||||||
(with-base-and-target-commits
|
(with-base-and-target-commits
|
||||||
request conn
|
query-parameters conn
|
||||||
(lambda (base-commit base-revision-id target-commit target-revision-id)
|
(lambda (base-commit base-revision-id target-commit target-revision-id)
|
||||||
(if (not (and base-revision-id target-revision-id))
|
(if (not (and base-revision-id target-revision-id))
|
||||||
(render-compare-unknown-commit 'html
|
(render-compare-unknown-commit 'html
|
||||||
|
|
@ -351,10 +375,16 @@
|
||||||
base-commit
|
base-commit
|
||||||
base-revision-id
|
base-revision-id
|
||||||
target-commit
|
target-commit
|
||||||
target-revision-id)))))
|
target-revision-id
|
||||||
|
(assoc-ref-multiple query-parameters
|
||||||
|
"system")
|
||||||
|
(assoc-ref-multiple query-parameters
|
||||||
|
"target")
|
||||||
|
(assoc-ref-multiple query-parameters
|
||||||
|
"build_status"))))))
|
||||||
((GET "compare" "derivations.json")
|
((GET "compare" "derivations.json")
|
||||||
(with-base-and-target-commits
|
(with-base-and-target-commits
|
||||||
request conn
|
query-parameters conn
|
||||||
(lambda (base-commit base-revision-id target-commit target-revision-id)
|
(lambda (base-commit base-revision-id target-commit target-revision-id)
|
||||||
(if (not (and base-revision-id target-revision-id))
|
(if (not (and base-revision-id target-revision-id))
|
||||||
(render-compare-unknown-commit 'json
|
(render-compare-unknown-commit 'json
|
||||||
|
|
@ -368,10 +398,16 @@
|
||||||
base-commit
|
base-commit
|
||||||
base-revision-id
|
base-revision-id
|
||||||
target-commit
|
target-commit
|
||||||
target-revision-id)))))
|
target-revision-id
|
||||||
|
(assoc-ref-multiple query-parameters
|
||||||
|
"system")
|
||||||
|
(assoc-ref-multiple query-parameters
|
||||||
|
"target")
|
||||||
|
(assoc-ref-multiple query-parameters
|
||||||
|
"build_status"))))))
|
||||||
((GET "compare" "packages")
|
((GET "compare" "packages")
|
||||||
(with-base-and-target-commits
|
(with-base-and-target-commits
|
||||||
request conn
|
query-parameters conn
|
||||||
(lambda (base-commit base-revision-id target-commit target-revision-id)
|
(lambda (base-commit base-revision-id target-commit target-revision-id)
|
||||||
(if (not (and base-revision-id target-revision-id))
|
(if (not (and base-revision-id target-revision-id))
|
||||||
(render-compare-unknown-commit 'html
|
(render-compare-unknown-commit 'html
|
||||||
|
|
@ -388,7 +424,7 @@
|
||||||
target-revision-id)))))
|
target-revision-id)))))
|
||||||
((GET "compare" "packages.json")
|
((GET "compare" "packages.json")
|
||||||
(with-base-and-target-commits
|
(with-base-and-target-commits
|
||||||
request conn
|
query-parameters conn
|
||||||
(lambda (base-commit base-revision-id target-commit target-revision-id)
|
(lambda (base-commit base-revision-id target-commit target-revision-id)
|
||||||
(if (not (and base-revision-id target-revision-id))
|
(if (not (and base-revision-id target-revision-id))
|
||||||
(render-compare-unknown-commit 'json
|
(render-compare-unknown-commit 'json
|
||||||
|
|
|
||||||
|
|
@ -641,11 +641,13 @@
|
||||||
(td ,name)
|
(td ,name)
|
||||||
(td (ul
|
(td (ul
|
||||||
,@(map (match-lambda
|
,@(map (match-lambda
|
||||||
((type . #(version))
|
((type . versions)
|
||||||
`(li (@ (class ,(if (eq? type 'base)
|
`(li (@ (class ,(if (eq? type 'base)
|
||||||
"text-danger"
|
"text-danger"
|
||||||
"text-success")))
|
"text-success")))
|
||||||
,version
|
,(string-join
|
||||||
|
(vector->list versions)
|
||||||
|
", ")
|
||||||
,(if (eq? type 'base)
|
,(if (eq? type 'base)
|
||||||
" (old)"
|
" (old)"
|
||||||
" (new)"))))
|
" (new)"))))
|
||||||
|
|
@ -726,10 +728,15 @@
|
||||||
(cdr data-columns))))))
|
(cdr data-columns))))))
|
||||||
(vector->list derivation-changes))))))))))
|
(vector->list derivation-changes))))))))))
|
||||||
|
|
||||||
(define (compare/derivations base-commit
|
(define (compare/derivations valid-systems
|
||||||
|
valid-build-statuses
|
||||||
|
base-commit
|
||||||
target-commit
|
target-commit
|
||||||
base-derivations
|
base-derivations
|
||||||
target-derivations)
|
target-derivations
|
||||||
|
systems
|
||||||
|
targets
|
||||||
|
build-statues)
|
||||||
(define query-params
|
(define query-params
|
||||||
(string-append "?base_commit=" base-commit
|
(string-append "?base_commit=" base-commit
|
||||||
"&target_commit=" target-commit))
|
"&target_commit=" target-commit))
|
||||||
|
|
@ -746,11 +753,118 @@
|
||||||
(h1 "Comparing "
|
(h1 "Comparing "
|
||||||
(samp ,(string-take base-commit 8) "…")
|
(samp ,(string-take base-commit 8) "…")
|
||||||
" and "
|
" and "
|
||||||
(samp ,(string-take target-commit 8) "…"))
|
(samp ,(string-take target-commit 8) "…")))
|
||||||
(a (@ (class "btn btn-default btn-lg")
|
(div
|
||||||
(href ,(string-append
|
(@ (class "row"))
|
||||||
"/compare/derivations.json" query-params)))
|
(div
|
||||||
"View JSON"))
|
(@ (class "col-md-12"))
|
||||||
|
(div
|
||||||
|
(@ (class "well"))
|
||||||
|
(form
|
||||||
|
(@ (method "get")
|
||||||
|
(action "")
|
||||||
|
(class "form-horizontal"))
|
||||||
|
(div (@ (class "form-group form-group-lg"))
|
||||||
|
(label (@ (for "inputBaseCommit")
|
||||||
|
(class "col-sm-2 control-label"))
|
||||||
|
"Base commit")
|
||||||
|
(div (@ (class "col-sm-9"))
|
||||||
|
(input (@ (class "form-control")
|
||||||
|
(style "font-family: monospace;")
|
||||||
|
(id "inputBaseCommit")
|
||||||
|
(required #t)
|
||||||
|
(aria-describedby "baseCommitHelp")
|
||||||
|
(name "base_commit")
|
||||||
|
(value ,base-commit)))
|
||||||
|
(span (@ (id "baseCommitHelp")
|
||||||
|
(class "help-block"))
|
||||||
|
(strong "Required.")
|
||||||
|
" The commit to use as the basis for the comparison.")))
|
||||||
|
(div (@ (class "form-group form-group-lg"))
|
||||||
|
(label (@ (for "inputTargetCommit")
|
||||||
|
(class "col-sm-2 control-label"))
|
||||||
|
"Target commit")
|
||||||
|
(div (@ (class "col-sm-9"))
|
||||||
|
(input (@ (class "form-control")
|
||||||
|
(style "font-family: monospace;")
|
||||||
|
(id "inputTargetCommit")
|
||||||
|
(required #t)
|
||||||
|
(aria-describedby "targetCommitHelp")
|
||||||
|
(name "target_commit")
|
||||||
|
(value ,target-commit)))
|
||||||
|
(span (@ (id "targetCommitHelp")
|
||||||
|
(class "help-block"))
|
||||||
|
(strong "Required.")
|
||||||
|
" The commit to compare against the base commit.")))
|
||||||
|
(div (@ (class "form-group form-group-lg"))
|
||||||
|
(label (@ (for "inputSystem")
|
||||||
|
(class "col-sm-2 control-label"))
|
||||||
|
"System")
|
||||||
|
(div (@ (class "col-sm-9"))
|
||||||
|
(select (@ (class "form-control")
|
||||||
|
(style "font-family: monospace;")
|
||||||
|
(multiple #t)
|
||||||
|
(id "inputSystem")
|
||||||
|
(aria-describedby "systemHelp")
|
||||||
|
(name "system"))
|
||||||
|
,@(map (lambda (system)
|
||||||
|
`(option (@ ,@(if (member system systems)
|
||||||
|
'((selected ""))
|
||||||
|
'()))
|
||||||
|
,system))
|
||||||
|
valid-systems))
|
||||||
|
(span (@ (id "systemHelp")
|
||||||
|
(class "help-block"))
|
||||||
|
"Only include derivations for this system.")))
|
||||||
|
(div (@ (class "form-group form-group-lg"))
|
||||||
|
(label (@ (for "inputTarget")
|
||||||
|
(class "col-sm-2 control-label"))
|
||||||
|
"Target")
|
||||||
|
(div (@ (class "col-sm-9"))
|
||||||
|
(select (@ (class "form-control")
|
||||||
|
(style "font-family: monospace;")
|
||||||
|
(multiple #t)
|
||||||
|
(id "inputTarget")
|
||||||
|
(aria-describedby "targetHelp")
|
||||||
|
(name "target"))
|
||||||
|
,@(map (lambda (system)
|
||||||
|
`(option (@ ,@(if (member system targets)
|
||||||
|
'((selected ""))
|
||||||
|
'()))
|
||||||
|
,system))
|
||||||
|
valid-systems))
|
||||||
|
(span (@ (id "targetHelp")
|
||||||
|
(class "help-block"))
|
||||||
|
"Only include derivations that are build for this system.")))
|
||||||
|
(div (@ (class "form-group form-group-lg"))
|
||||||
|
(label (@ (for "inputBuildStatus")
|
||||||
|
(class "col-sm-2 control-label"))
|
||||||
|
"Build status")
|
||||||
|
(div (@ (class "col-sm-9"))
|
||||||
|
(select (@ (class "form-control")
|
||||||
|
(id "inputBuildStatus")
|
||||||
|
(aria-describedby "buildStatusHelp")
|
||||||
|
(multiple #t)
|
||||||
|
(name "build_status"))
|
||||||
|
,@(map (lambda (build-status)
|
||||||
|
`(option (@ ,@(if (member build-status build-statues)
|
||||||
|
'((selected ""))
|
||||||
|
'())
|
||||||
|
(value ,build-status))
|
||||||
|
,(build-status-value->display-string build-status)))
|
||||||
|
valid-build-statuses))
|
||||||
|
(span (@ (id "buildStatusHelp")
|
||||||
|
(class "help-block"))
|
||||||
|
"Only include derivations which have this build status.")))
|
||||||
|
(div (@ (class "form-group form-group-lg"))
|
||||||
|
(div (@ (class "col-sm-offset-2 col-sm-10"))
|
||||||
|
(button (@ (type "submit")
|
||||||
|
(class "btn btn-lg btn-primary"))
|
||||||
|
"Update results")))
|
||||||
|
(a (@ (class "btn btn-default btn-lg pull-right")
|
||||||
|
(href ,(string-append
|
||||||
|
"/compare/derivations.json" query-params)))
|
||||||
|
"View JSON")))))
|
||||||
(div
|
(div
|
||||||
(@ (class "row"))
|
(@ (class "row"))
|
||||||
(h3 "Base ("
|
(h3 "Base ("
|
||||||
|
|
@ -761,15 +875,19 @@
|
||||||
(@ (class "table"))
|
(@ (class "table"))
|
||||||
(thead
|
(thead
|
||||||
(tr
|
(tr
|
||||||
(th (@ (class "col-md-8")) "File Name")
|
(th (@ (class "col-md-6")) "File Name")
|
||||||
|
(th (@ (class "col-md-2")) "System")
|
||||||
|
(th (@ (class "col-md-2")) "Target")
|
||||||
(th (@ (class "col-md-4")) "Build status")))
|
(th (@ (class "col-md-4")) "Build status")))
|
||||||
(tbody
|
(tbody
|
||||||
,@(map
|
,@(map
|
||||||
(match-lambda
|
(match-lambda
|
||||||
((file-name build-status)
|
((file-name system target build-status)
|
||||||
`(tr
|
`(tr
|
||||||
(td (a (@ (href ,file-name))
|
(td (a (@ (href ,file-name))
|
||||||
,(display-store-item file-name)))
|
,(display-store-item-short file-name)))
|
||||||
|
(td (samp ,system))
|
||||||
|
(td (samp ,target))
|
||||||
(td ,(build-status-span build-status)))))
|
(td ,(build-status-span build-status)))))
|
||||||
base-derivations))))
|
base-derivations))))
|
||||||
(div
|
(div
|
||||||
|
|
@ -783,14 +901,18 @@
|
||||||
(thead
|
(thead
|
||||||
(tr
|
(tr
|
||||||
(th (@ (class "col-md-8")) "File Name")
|
(th (@ (class "col-md-8")) "File Name")
|
||||||
|
(th (@ (class "col-md-2")) "System")
|
||||||
|
(th (@ (class "col-md-2")) "Target")
|
||||||
(th (@ (class "col-md-4")) "Build status")))
|
(th (@ (class "col-md-4")) "Build status")))
|
||||||
(tbody
|
(tbody
|
||||||
,@(map
|
,@(map
|
||||||
(match-lambda
|
(match-lambda
|
||||||
((file-name build-status)
|
((file-name system target build-status)
|
||||||
`(tr
|
`(tr
|
||||||
(td (a (@ (href ,file-name))
|
(td (a (@ (href ,file-name))
|
||||||
,(display-store-item file-name)))
|
,(display-store-item-short file-name)))
|
||||||
|
(td (samp ,system))
|
||||||
|
(td (samp ,target))
|
||||||
(td ,(build-status-span build-status)))))
|
(td ,(build-status-span build-status)))))
|
||||||
target-derivations))))))))
|
target-derivations))))))))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue