summaryrefslogtreecommitdiff
path: root/guix-web/view.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix-web/view.scm')
-rw-r--r--guix-web/view.scm26
1 files changed, 25 insertions, 1 deletions
diff --git a/guix-web/view.scm b/guix-web/view.scm
index f448375..123a1d5 100644
--- a/guix-web/view.scm
+++ b/guix-web/view.scm
@@ -24,12 +24,15 @@
#:use-module (web uri)
#:use-module (guix licenses)
#:use-module (guix packages)
+ #:use-module (guix profiles)
#:use-module (gnu packages)
+ #:use-module (guix-web package)
#:export (all-packages
all-packages-json
view-package
view-package-json
- librejs))
+ librejs
+ generations-json))
(define-record-type <javascript>
(javascript source-uri license)
@@ -53,6 +56,9 @@
(javascript "/js/model/packages.js" agpl3+)
(javascript "/js/view/packages.js" agpl3+)
(javascript "/js/controller/packages.js" agpl3+)
+ (javascript "/js/model/generations.js" agpl3+)
+ (javascript "/js/view/generations.js" agpl3+)
+ (javascript "/js/controller/generations.js" agpl3+)
(javascript "/js/routes.js" agpl3+)))
(define (script-tag javascript)
@@ -215,3 +221,21 @@
(th "License")
(th "Source Code")))
(tbody ,@(map weblabel javascripts))))))
+
+(define (generations-json)
+ (map (match-lambda
+ ((n . manifest-entries)
+ (json
+ (object
+ ("number" ,n)
+ ("manifestEntries"
+ ,(map (match-lambda
+ (($ <manifest-entry> name version output location _)
+ (json
+ (object
+ ("name" ,name)
+ ("version" ,version)
+ ("output" ,output)
+ ("location" ,location)))))
+ manifest-entries))))))
+ (profile-generations*)))