Improve the Unknown revision page
Make it similar to the revision page, as some of the information, like the link to the relevant CGit instance might be available.
This commit is contained in:
parent
3df0b43146
commit
e93b8f948e
2 changed files with 50 additions and 10 deletions
|
|
@ -151,7 +151,8 @@
|
||||||
#:sxml (unknown-revision
|
#:sxml (unknown-revision
|
||||||
commit-hash
|
commit-hash
|
||||||
(select-job-for-commit
|
(select-job-for-commit
|
||||||
conn commit-hash))))))
|
conn commit-hash)
|
||||||
|
(git-branches-with-repository-details-for-commit conn commit-hash))))))
|
||||||
|
|
||||||
(define* (render-revision-packages mime-types
|
(define* (render-revision-packages mime-types
|
||||||
conn
|
conn
|
||||||
|
|
|
||||||
|
|
@ -1471,20 +1471,59 @@
|
||||||
(h1 ,header-text)
|
(h1 ,header-text)
|
||||||
(p ,body)))))
|
(p ,body)))))
|
||||||
|
|
||||||
(define (unknown-revision commit-hash job)
|
(define (unknown-revision commit-hash job git-repositories-and-branches)
|
||||||
(layout
|
(layout
|
||||||
#:body
|
#:body
|
||||||
`(,(header)
|
`(,(header)
|
||||||
(div
|
(div
|
||||||
(@ (class "container"))
|
(@ (class "container"))
|
||||||
(h1 "Unknown revision")
|
,@(match job
|
||||||
(p "No known revision with commit "
|
(()
|
||||||
(strong (samp ,commit-hash))
|
`((h1 "Unknown revision")
|
||||||
,(match job
|
(p "No known revision with commit "
|
||||||
(()
|
(strong (samp ,commit-hash)))))
|
||||||
" and it is not currently queued for processing")
|
((jobs ...)
|
||||||
((job)
|
`((div
|
||||||
" but it is queued for processing")))))))
|
(@ (class "row"))
|
||||||
|
(div
|
||||||
|
(@ (class "col-md-12"))
|
||||||
|
(h1 (@ (style "white-space: nowrap;"))
|
||||||
|
"Revision " (samp ,commit-hash))))
|
||||||
|
(div
|
||||||
|
(@ (class "row"))
|
||||||
|
(div
|
||||||
|
(@ (class "col-md-6"))
|
||||||
|
(h2 "Packages")
|
||||||
|
(strong (@ (class "text-center")
|
||||||
|
(style "font-size: 2em; display: block;"))
|
||||||
|
"Unknown")
|
||||||
|
|
||||||
|
,@(if
|
||||||
|
(null? git-repositories-and-branches)
|
||||||
|
'()
|
||||||
|
`((h3 "Git repositories")
|
||||||
|
,@(map
|
||||||
|
(match-lambda
|
||||||
|
(((label url cgit-url-base) . branches)
|
||||||
|
`((h4 ,url)
|
||||||
|
,@(map
|
||||||
|
(match-lambda
|
||||||
|
((name datetime)
|
||||||
|
(if (string-null? cgit-url-base)
|
||||||
|
`(,name " at " ,datetime)
|
||||||
|
`(a (@ (href ,(string-append
|
||||||
|
cgit-url-base
|
||||||
|
"commit/?id="
|
||||||
|
commit-hash)))
|
||||||
|
,name " at " ,datetime))))
|
||||||
|
branches))))
|
||||||
|
git-repositories-and-branches))))
|
||||||
|
(div
|
||||||
|
(@ (class "col-md-6"))
|
||||||
|
(h3 "Derivations")
|
||||||
|
(strong (@ (class "text-center")
|
||||||
|
(style "font-size: 2em; display: block;"))
|
||||||
|
"Unknown"))))))))))
|
||||||
|
|
||||||
(define (compare-unknown-commit base-commit target-commit
|
(define (compare-unknown-commit base-commit target-commit
|
||||||
base-exists? target-exists?
|
base-exists? target-exists?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue