aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-07-29 21:11:45 +0100
committerChristopher Baines <mail@cbaines.net>2019-07-29 21:11:45 +0100
commit1724bc485f13922d768bc09309a6a7975678c321 (patch)
tree735870cc3a9b859fd9f20d1c4d9bc054e043a3fc
parentef123dcded503f445c7ca533632a00e68bce32b5 (diff)
downloaddata-service-1724bc485f13922d768bc09309a6a7975678c321.tar
data-service-1724bc485f13922d768bc09309a6a7975678c321.tar.gz
Link to the comparison page from the branch page
To allow easily comparing revisions.
-rw-r--r--guix-data-service/web/view/html.scm32
1 files changed, 26 insertions, 6 deletions
diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm
index 1702a71..4b1129f 100644
--- a/guix-data-service/web/view/html.scm
+++ b/guix-data-service/web/view/html.scm
@@ -789,15 +789,17 @@
(div
(@ (class "col-md-12"))
(table
- (@ (class "table table-responsive"))
+ (@ (class "table table-responsive")
+ (style "table-layout: fixed;"))
(thead
(tr
(th (@ (class "col-md-3")) "Date")
- (th (@ (class "col-md-3")) "Commit")))
+ (th (@ (class "col-md-7")) "Commit")
+ (th (@ (class "col-md-1")))))
(tbody
,@(map
- (match-lambda
- ((commit date revision-exists? job-events)
+ (match-lambda*
+ (((commit date revision-exists? job-events) previous-commit)
`(tr
(td ,date)
(td ,@(if (string=? commit "NULL")
@@ -816,8 +818,26 @@
"Failed to import data"))
(else
'(span (@ (class "label label-default"))
- "No information yet")))))))))
- branch-commits)))))))))
+ "No information yet"))))))
+ ,@(if previous-commit
+ `((td
+ (@ (style "vertical-align: middle;")
+ (rowspan "2"))
+ (div
+ (@ (class "btn-group")
+ (role "group"))
+ (a (@ (class "btn btn-sm btn-default")
+ (title "Compare")
+ (href ,(string-append
+ "/compare"
+ "?base_commit=" previous-commit
+ "&target_commit=" commit)))
+ "⇕ Compare"))))
+ '()))))
+ branch-commits
+ (append (map first (cdr branch-commits))
+ (list #f)))))))))))
+
(define (view-builds stats builds)
(layout