Implement the JSON response for the package derivations page
This commit is contained in:
parent
68420b1085
commit
7a7dedfa1b
2 changed files with 33 additions and 1 deletions
|
|
@ -767,7 +767,26 @@
|
|||
mime-types)
|
||||
((application/json)
|
||||
(render-json
|
||||
`()))
|
||||
`((derivations . ,(list->vector
|
||||
(map (match-lambda
|
||||
((derivation system target)
|
||||
`((derivation . ,derivation)
|
||||
,@(if (member "system" fields)
|
||||
`((system . ,system))
|
||||
'())
|
||||
,@(if (member "target" fields)
|
||||
`((target . ,target))
|
||||
'())))
|
||||
((derivation system target builds)
|
||||
`((derivation . ,derivation)
|
||||
,@(if (member "system" fields)
|
||||
`((system . ,system))
|
||||
'())
|
||||
,@(if (member "target" fields)
|
||||
`((target . ,target))
|
||||
'())
|
||||
(builds . ,builds))))
|
||||
derivations))))))
|
||||
(else
|
||||
(render-html
|
||||
#:sxml (view-revision-package-derivations
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue