aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/web/view
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-07-19 21:22:15 +0100
committerChristopher Baines <mail@cbaines.net>2019-07-19 21:22:15 +0100
commit1f977f6c125e10061610dd62c7287e6e9448dea5 (patch)
tree9bc4f9d736378f8cb231eb15cb0e59b8ef4a2abf /guix-data-service/web/view
parent6dd52f08edbe7525c26b86a0d1a414b96cf2288d (diff)
downloaddata-service-1f977f6c125e10061610dd62c7287e6e9448dea5.tar
data-service-1f977f6c125e10061610dd62c7287e6e9448dea5.tar.gz
Improve how repositories and branches are handled
Make the link between repositories and branches clearer, replacing the /branches and /branch pages by /repository/ and /repository/*/branch/* pages.
Diffstat (limited to 'guix-data-service/web/view')
-rw-r--r--guix-data-service/web/view/html.scm27
1 files changed, 19 insertions, 8 deletions
diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm
index bd0be26..78a7183 100644
--- a/guix-data-service/web/view/html.scm
+++ b/guix-data-service/web/view/html.scm
@@ -35,6 +35,7 @@
view-revision-package-and-version
view-revision
view-revision-packages
+ view-git-repository
view-branches
view-branch
view-builds
@@ -232,7 +233,7 @@
(h1 "Guix Data Service")))
,@(map
(match-lambda
- (((id label url) . revisions)
+ (((repository-id label url) . revisions)
`(div
(@ (class "row"))
(div
@@ -249,7 +250,7 @@
(tbody
,@(map
(match-lambda
- ((id job-id job-events commit source branches)
+ ((revision-id job-id job-events commit source branches)
`(tr
(td
,@(map
@@ -257,6 +258,8 @@
((name date)
`(span
(a (@ (href ,(string-append
+ "/repository/"
+ repository-id
"/branch/" name)))
,name)
" at "
@@ -267,7 +270,7 @@
(samp ,commit))
" "
,(cond
- ((not (string-null? id))
+ ((not (string-null? revision-id))
'(span
(@ (class "label label-success"))
"✓"))
@@ -630,7 +633,9 @@
"Next page")))
'())))))
-(define* (view-branches branches-with-most-recent-commits)
+(define* (view-git-repository git-repository-id
+ label url cgit-url-base
+ branches-with-most-recent-commits)
(layout
#:body
`(,(header)
@@ -640,11 +645,12 @@
(@ (class "row"))
(div
(@ (class "col-md-12"))
- (h1 "Branches")))
+ (h1 ,url)))
(div
(@ (class "row"))
(div
(@ (class "col-md-12"))
+ (h3 "Branches")
(table
(@ (class "table table-responsive"))
(thead
@@ -658,7 +664,9 @@
((name commit date revision-exists? job-events)
`(tr
(td
- (a (@ (href ,(string-append "/branch/" name)))
+ (a (@ (href ,(string-append
+ "/repository/" git-repository-id
+ "/branch/" name)))
,name))
(td ,date)
(td ,@(if (string=? commit "NULL")
@@ -680,8 +688,8 @@
"No information yet")))))))))
branches-with-most-recent-commits)))))))))
-(define (view-branch branch-name query-parameters
- branch-commits)
+(define (view-branch git-repository-id
+ branch-name query-parameters branch-commits)
(layout
#:body
`(,(header)
@@ -691,6 +699,8 @@
(@ (class "row"))
(div
(@ (class "col-md-12"))
+ (a (@ (href ,(string-append "/repository/" git-repository-id)))
+ (h3 "Repository"))
(h1 (@ (style "white-space: nowrap;"))
(samp ,branch-name) " branch")))
(div
@@ -723,6 +733,7 @@
(@ (class "col-sm-12"))
(a (@ (class "btn btn-default btn-lg pull-right")
(href ,(string-append
+ "/repository/" git-repository-id
"/branch/" branch-name "/latest-processed-revision")))
"Latest processed revision")))
(div