Switch the index page to show branches for a repository
As that's probably more useful than recent revisions and jobs.
This commit is contained in:
parent
c23822e14d
commit
05db0a87f9
2 changed files with 8 additions and 55 deletions
|
|
@ -621,18 +621,8 @@
|
||||||
(lambda (git-repository-details)
|
(lambda (git-repository-details)
|
||||||
(cons
|
(cons
|
||||||
git-repository-details
|
git-repository-details
|
||||||
(map
|
(all-branches-with-most-recent-commit
|
||||||
(match-lambda
|
conn (first git-repository-details))))
|
||||||
((id job-id job-events commit source)
|
|
||||||
(list id
|
|
||||||
job-id
|
|
||||||
job-events
|
|
||||||
commit
|
|
||||||
source
|
|
||||||
(git-branches-for-commit conn commit))))
|
|
||||||
(guix-revisions-and-jobs-for-git-repository
|
|
||||||
conn
|
|
||||||
(car git-repository-details)))))
|
|
||||||
(all-git-repositories conn)))))
|
(all-git-repositories conn)))))
|
||||||
(('GET "builds")
|
(('GET "builds")
|
||||||
(render-html
|
(render-html
|
||||||
|
|
|
||||||
|
|
@ -233,54 +233,17 @@
|
||||||
(h1 "Guix Data Service")))
|
(h1 "Guix Data Service")))
|
||||||
,@(map
|
,@(map
|
||||||
(match-lambda
|
(match-lambda
|
||||||
(((repository-id label url) . revisions)
|
(((repository-id label url) . branches-with-most-recent-commits)
|
||||||
`(div
|
`(div
|
||||||
(@ (class "row"))
|
(@ (class "row"))
|
||||||
(div
|
(div
|
||||||
(@ (class "col-sm-12"))
|
(@ (class "col-sm-12"))
|
||||||
(h3 ,url)
|
(h3 ,url)
|
||||||
,(if (null? revisions)
|
,(if (null? branches-with-most-recent-commits)
|
||||||
'(p "No revisions")
|
'(p "No branches")
|
||||||
`(table
|
(table/branches-with-most-recent-commits
|
||||||
(@ (class "table"))
|
|
||||||
(thead
|
|
||||||
(tr
|
|
||||||
(th (@ (class "col-md-6")) "Branch")
|
|
||||||
(th (@ (class "col-md-6")) "Commit")))
|
|
||||||
(tbody
|
|
||||||
,@(map
|
|
||||||
(match-lambda
|
|
||||||
((revision-id job-id job-events commit source branches)
|
|
||||||
`(tr
|
|
||||||
(td
|
|
||||||
,@(map
|
|
||||||
(match-lambda
|
|
||||||
((name date)
|
|
||||||
`(span
|
|
||||||
(a (@ (href ,(string-append
|
|
||||||
"/repository/"
|
|
||||||
repository-id
|
repository-id
|
||||||
"/branch/" name)))
|
branches-with-most-recent-commits))))))
|
||||||
,name)
|
|
||||||
" at "
|
|
||||||
,date)))
|
|
||||||
branches))
|
|
||||||
(td (a (@ (href ,(string-append
|
|
||||||
"/revision/" commit)))
|
|
||||||
(samp ,commit))
|
|
||||||
" "
|
|
||||||
,(cond
|
|
||||||
((not (string-null? revision-id))
|
|
||||||
'(span
|
|
||||||
(@ (class "label label-success"))
|
|
||||||
"✓"))
|
|
||||||
((member "failure" job-events)
|
|
||||||
'(span (@ (class "label label-danger"))
|
|
||||||
"Failed to import data"))
|
|
||||||
(else
|
|
||||||
'(span (@ (class "label label-default"))
|
|
||||||
"No information yet")))))))
|
|
||||||
revisions))))))))
|
|
||||||
git-repositories-and-revisions)))))
|
git-repositories-and-revisions)))))
|
||||||
|
|
||||||
(define (view-statistics guix-revisions-count derivations-count)
|
(define (view-statistics guix-revisions-count derivations-count)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue