diff options
author | Christopher Baines <mail@cbaines.net> | 2019-06-19 22:03:55 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-06-19 22:03:55 +0100 |
commit | e93b8f948e77c999b5048eb7118f6459373f15bc (patch) | |
tree | b6ce2eac850e02501e4f0345479aa6c2569605f8 /guix-data-service/web | |
parent | 3df0b43146e20b8d86da5f890ca5cc163e929805 (diff) | |
download | data-service-e93b8f948e77c999b5048eb7118f6459373f15bc.tar data-service-e93b8f948e77c999b5048eb7118f6459373f15bc.tar.gz |
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.
Diffstat (limited to 'guix-data-service/web')
-rw-r--r-- | guix-data-service/web/controller.scm | 3 | ||||
-rw-r--r-- | guix-data-service/web/view/html.scm | 57 |
2 files changed, 50 insertions, 10 deletions
diff --git a/guix-data-service/web/controller.scm b/guix-data-service/web/controller.scm index 0fb5383..a812570 100644 --- a/guix-data-service/web/controller.scm +++ b/guix-data-service/web/controller.scm @@ -151,7 +151,8 @@ #:sxml (unknown-revision commit-hash (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 conn diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm index 4565d16..c837724 100644 --- a/guix-data-service/web/view/html.scm +++ b/guix-data-service/web/view/html.scm @@ -1471,20 +1471,59 @@ (h1 ,header-text) (p ,body))))) -(define (unknown-revision commit-hash job) +(define (unknown-revision commit-hash job git-repositories-and-branches) (layout #:body `(,(header) (div (@ (class "container")) - (h1 "Unknown revision") - (p "No known revision with commit " - (strong (samp ,commit-hash)) - ,(match job - (() - " and it is not currently queued for processing") - ((job) - " but it is queued for processing"))))))) + ,@(match job + (() + `((h1 "Unknown revision") + (p "No known revision with commit " + (strong (samp ,commit-hash))))) + ((jobs ...) + `((div + (@ (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 base-exists? target-exists? |