diff options
author | Christopher Baines <mail@cbaines.net> | 2019-12-26 08:52:04 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-12-26 08:52:04 +0000 |
commit | 4eb5a3417c13f74745ec7ca3d92a95096c176da1 (patch) | |
tree | c811e26efc99981e7e77db192e20879965b1a414 /guix-data-service/web/view | |
parent | 566f20a03da5e31eac60f6f92236b170808d52fd (diff) | |
download | data-service-4eb5a3417c13f74745ec7ca3d92a95096c176da1.tar data-service-4eb5a3417c13f74745ec7ca3d92a95096c176da1.tar.gz |
Group derivation input outputs together by derivation
Both in terms of the code fetching the data from the database, as well as the
formatted and detail outputs. This corrects an error in the formatted output
for derivations where inputs would be duplicated.
Diffstat (limited to 'guix-data-service/web/view')
-rw-r--r-- | guix-data-service/web/view/html.scm | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm index 51c021c..8375d0b 100644 --- a/guix-data-service/web/view/html.scm +++ b/guix-data-service/web/view/html.scm @@ -551,10 +551,10 @@ (th "File name"))) (tdata ,@(map (match-lambda - ((file-name output-name path) + ((derivation-file-name outputs) `(tr - (td (a (@ (href ,file-name)) - ,(display-store-item-short path)))))) + (td (a (@ (href ,derivation-file-name)) + ,(display-store-item-short derivation-file-name)))))) derivation-inputs))))) (div (@ (class "col-md-4")) @@ -697,14 +697,22 @@ (@ (class "col-md-10") (style "font-family: monospace;")) ,@(map (match-lambda* - (((file-name output-name path) count-down) + (((file-name outputs) count-down) `(div (@ (style "margin-left: 3em;")) "(\"" (a (@ (href ,file-name)) ,(display-store-item file-name)) "\",\"" - "[\"" ,output-name "\"]" + "[" ,(string-join + (map (lambda (output) + (string-append + "\"" + (assoc-ref output "output_name") + "\"")) + (vector->list outputs)) + ",") + "]" ")" ,@(if (eq? count-down 0) '() |