diff options
author | Christopher Baines <mail@cbaines.net> | 2019-12-22 14:27:59 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-12-22 14:27:59 +0000 |
commit | 14b79936369c2755d9a98d2c3ca839081b20833d (patch) | |
tree | 1289ac81354314828fd8bfaf9f2779e7ab6c6160 /guix-data-service/web/revision | |
parent | e4a7f221c946b4c03a418e927ef1579e8b09ce83 (diff) | |
download | data-service-14b79936369c2755d9a98d2c3ca839081b20833d.tar data-service-14b79936369c2755d9a98d2c3ca839081b20833d.tar.gz |
Allow filtering the revision builds page by system
Diffstat (limited to 'guix-data-service/web/revision')
-rw-r--r-- | guix-data-service/web/revision/controller.scm | 50 | ||||
-rw-r--r-- | guix-data-service/web/revision/html.scm | 13 |
2 files changed, 43 insertions, 20 deletions
diff --git a/guix-data-service/web/revision/controller.scm b/guix-data-service/web/revision/controller.scm index 05a259b..90416df 100644 --- a/guix-data-service/web/revision/controller.scm +++ b/guix-data-service/web/revision/controller.scm @@ -234,7 +234,9 @@ (parse-query-parameters request `((build_status ,parse-build-status #:multi-value) - (build_server ,(parse-build-server conn) #:multi-value))))) + (build_server ,(parse-build-server conn) #:multi-value) + (system ,parse-system #:default "x86_64-linux") + (target ,parse-system #:default "x86_64-linux"))))) (render-revision-builds mime-types conn @@ -754,28 +756,36 @@ (render-html #:sxml (view-revision-builds query-parameters build-status-strings + (valid-systems conn) '() '() '())) - (render-html - #:sxml (view-revision-builds query-parameters - build-status-strings - (map (match-lambda - ((id url lookup-all-derivations) - (cons url id))) - (select-build-servers conn)) - (select-build-stats - conn - (assq-ref query-parameters - 'build_server) - #:revision-commit commit-hash) - (select-builds-with-context - conn - (assq-ref query-parameters - 'build_status) - (assq-ref query-parameters - 'build_server) - #:revision-commit commit-hash))))) + (let ((system (assq-ref query-parameters 'system)) + (target (assq-ref query-parameters 'target))) + (render-html + #:sxml (view-revision-builds query-parameters + build-status-strings + (valid-systems conn) + (map (match-lambda + ((id url lookup-all-derivations) + (cons url id))) + (select-build-servers conn)) + (select-build-stats + conn + (assq-ref query-parameters + 'build_server) + #:revision-commit commit-hash + #:system system + #:target target) + (select-builds-with-context + conn + (assq-ref query-parameters + 'build_status) + (assq-ref query-parameters + 'build_server) + #:revision-commit commit-hash + #:system system + #:target target)))))) (define* (render-revision-lint-warnings mime-types conn diff --git a/guix-data-service/web/revision/html.scm b/guix-data-service/web/revision/html.scm index 1f451d1..127005f 100644 --- a/guix-data-service/web/revision/html.scm +++ b/guix-data-service/web/revision/html.scm @@ -1149,6 +1149,7 @@ figure { (define (view-revision-builds query-parameters build-status-strings + valid-systems build-server-options stats builds) @@ -1210,6 +1211,18 @@ figure { query-parameters #:options build-server-options #:help-text "Return builds from these build servers.") + ,(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") (div (@ (class "form-group form-group-lg")) (div (@ (class "col-sm-offset-2 col-sm-10")) (button (@ (type "submit") |