aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/web/repository
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-11-18 19:49:15 +0000
committerChristopher Baines <mail@cbaines.net>2019-11-21 19:56:19 +0000
commit62cabc80bfa8798a28767be11c23c370de7b45d4 (patch)
tree83fe578b8b6d092cfc68405d85d89eeefcfc88e1 /guix-data-service/web/repository
parentf23ee71ea7efedd14843a474f87550d7d991cca7 (diff)
downloaddata-service-62cabc80bfa8798a28767be11c23c370de7b45d4.tar
data-service-62cabc80bfa8798a28767be11c23c370de7b45d4.tar.gz
Link to the comparison page when viewing derivation history
Diffstat (limited to 'guix-data-service/web/repository')
-rw-r--r--guix-data-service/web/repository/html.scm34
1 files changed, 27 insertions, 7 deletions
diff --git a/guix-data-service/web/repository/html.scm b/guix-data-service/web/repository/html.scm
index 129279d..2e93c45 100644
--- a/guix-data-service/web/repository/html.scm
+++ b/guix-data-service/web/repository/html.scm
@@ -332,10 +332,11 @@
(style "table-layout: fixed;"))
(thead
(tr
- (th (@ (class "col-sm-3")) "Version")
- (th (@ (class "col-sm-5")) "Derivation")
- (th (@ (class "col-sm-4")) "From")
- (th (@ (class "col-sm-4")) "To")))
+ (th (@ (class "col-sm-2")) "Version")
+ (th (@ (class "col-sm-4")) "Derivation")
+ (th (@ (class "col-sm-2")) "From")
+ (th (@ (class "col-sm-2")) "To")
+ (th (@ (class "col-sm-1")) "")))
(tbody
,@(let* ((times-in-seconds
(map (lambda (d)
@@ -360,7 +361,8 @@
first-guix-revision-commit
first-datetime
last-guix-revision-commit
- last-datetime))
+ last-datetime)
+ next-derivation-file-name)
`((tr
(@ (style "border-bottom: 0;"))
,@(match version-column-entry
@@ -391,7 +393,21 @@
last-guix-revision-commit
"/package/"
package-name "/" package-version)))
- "(More information)")))
+ "(More information)"))
+ (td
+ (@ (rowspan 4)
+ (style "vertical-align: middle;"))
+ ,@(if next-derivation-file-name
+ `((a
+ (@ (class "btn btn-sm btn-default")
+ (title "Compare")
+ (href
+ ,(string-append
+ "/compare/derivation"
+ "?base_derivation=" next-derivation-file-name
+ "&target_derivation=" derivation-file-name)))
+ "⇕ Compare"))
+ '())))
(tr
(td
(@ (colspan 3)
@@ -428,4 +444,8 @@
(rationalize margin-left 1)
(rationalize width 1)))))))))))
versions-list
- derivations-by-revision-range))))))))))
+ derivations-by-revision-range
+ (append
+ (map second
+ (cdr derivations-by-revision-range))
+ '(#f))))))))))))