diff options
Diffstat (limited to 'guix-data-service/web/build-server/html.scm')
-rw-r--r-- | guix-data-service/web/build-server/html.scm | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/guix-data-service/web/build-server/html.scm b/guix-data-service/web/build-server/html.scm index 9bb70eb..7a94315 100644 --- a/guix-data-service/web/build-server/html.scm +++ b/guix-data-service/web/build-server/html.scm @@ -16,9 +16,57 @@ ;;; <http://www.gnu.org/licenses/>. (define-module (guix-data-service web build-server html) + #:use-module (ice-9 match) #:use-module (guix-data-service web view html) #:use-module (guix-data-service web html-utils) - #:export (view-signing-key)) + #:export (view-build + view-signing-key)) + +(define (view-build query-parameters + build) + (define derivation + (assq-ref query-parameters 'derivation_file_name)) + + (peek build) + (layout + #:body + `(,(header) + (div + (@ (class "container")) + (div + (@ (class "row")) + (div + (@ (class "col-sm-12")) + (h1 "Build"))) + (div + (@ (class "row")) + ,@(match build + ((url statuses) + `((div + (@ (class "col-sm-6")) + (dl + (@ (class "dl-horizontal")) + (dt "Derivation") + (dd ,(display-possible-store-item derivation)) + (dt "Build server URL") + (dd (a (@ (href ,url)) + ,url)))) + (div + (@ (class "col-sm-6")) + (h3 "Timeline") + (table + (@ (class "table")) + (thead + (tr + (th "Timestamp") + (th "Status"))) + (tbody + ,@(map (lambda (status) + `(tr + (td ,(assoc-ref status "timestamp")) + (td ,(build-status-span + (assoc-ref status "status"))))) + (vector->list statuses))))))))))))) (define (view-signing-key sexp) (layout |