aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/web/controller.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-06-20 14:29:56 +0200
committerChristopher Baines <mail@cbaines.net>2019-06-20 14:29:56 +0200
commitd07e3d9ba88aee9a90f78e5ee945f51fbb9dcb9f (patch)
tree1b85f7607ec02d62efb75e3c888b30a12c924fbb /guix-data-service/web/controller.scm
parentbb0251160730a36488185eefe16e35f611ecc655 (diff)
downloaddata-service-d07e3d9ba88aee9a90f78e5ee945f51fbb9dcb9f.tar
data-service-d07e3d9ba88aee9a90f78e5ee945f51fbb9dcb9f.tar.gz
Move the derivations off the compare page
To the compare/derivations page. Previously, the compare/derivations page was comparing more than the derivations, notably the package metadata. This change avoids that, and also reduces the information overload on the compare page.
Diffstat (limited to 'guix-data-service/web/controller.scm')
-rw-r--r--guix-data-service/web/controller.scm41
1 files changed, 8 insertions, 33 deletions
diff --git a/guix-data-service/web/controller.scm b/guix-data-service/web/controller.scm
index a6330d8..f5d4d90 100644
--- a/guix-data-service/web/controller.scm
+++ b/guix-data-service/web/controller.scm
@@ -358,10 +358,7 @@
target-packages-vhash))
(version-changes
(package-data-version-changes base-packages-vhash
- target-packages-vhash))
- (derivation-changes
- (package-data-derivation-changes base-packages-vhash
- target-packages-vhash)))
+ target-packages-vhash)))
(case (most-appropriate-mime-type
'(application/json text/html)
mime-types)
@@ -369,8 +366,7 @@
(render-json
`((new-packages . ,(list->vector new-packages))
(removed-packages . ,(list->vector removed-packages))
- (version-changes . ,version-changes)
- (derivation-changes . ,derivation-changes))
+ (version-changes . ,(list->vector version-changes)))
#:extra-headers http-headers-for-unchanging-content))
(else
(render-html
@@ -378,8 +374,7 @@
target-commit
new-packages
removed-packages
- version-changes
- derivation-changes)
+ version-changes)
#:extra-headers http-headers-for-unchanging-content))))))
(define (render-compare/derivations mime-types
@@ -409,7 +404,6 @@
query-parameters
(valid-systems conn)
build-status-strings
- '()
'()))))
(let ((base-commit (assq-ref query-parameters 'base_commit))
@@ -423,33 +417,15 @@
(package-differences-data conn
(commit->revision-id conn base-commit)
(commit->revision-id conn target-commit)))))
- (let ((base-derivations
- (package-data-vhash->derivations-and-build-status
- conn
- base-packages-vhash
- systems
- targets
- build-statuses))
- (target-derivations
- (package-data-vhash->derivations-and-build-status
- conn
- target-packages-vhash
- systems
- targets
- build-statuses)))
+ (let ((derivation-changes
+ (package-data-derivation-changes base-packages-vhash
+ target-packages-vhash)))
(case (most-appropriate-mime-type
'(application/json text/html)
mime-types)
((application/json)
(render-json
- `((base . ((commit . ,base-commit)
- (derivations . ,(list->vector
- (derivations->alist
- base-derivations)))))
- (target . ((commit . ,target-commit)
- (derivations . ,(list->vector
- (derivations->alist
- target-derivations))))))
+ derivation-changes
#:extra-headers http-headers-for-unchanging-content))
(else
(render-html
@@ -457,8 +433,7 @@
query-parameters
(valid-systems conn)
build-status-strings
- base-derivations
- target-derivations)
+ derivation-changes)
#:extra-headers http-headers-for-unchanging-content))))))))
(define (render-compare/packages mime-types