diff options
author | Christopher Baines <mail@cbaines.net> | 2019-03-03 18:15:29 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-03-03 18:15:29 +0000 |
commit | 623347d83513a1f35103186ca78e85443ee543ae (patch) | |
tree | 90eafa9cde35f91b23ab3358eb42cd3f5f8af27f /guix-data-service/web/view | |
parent | ffdd2416f487569830cc6c2038bff4c6cb25193a (diff) | |
download | data-service-623347d83513a1f35103186ca78e85443ee543ae.tar data-service-623347d83513a1f35103186ca78e85443ee543ae.tar.gz |
Add a list of the queued revisions to the index page
Diffstat (limited to 'guix-data-service/web/view')
-rw-r--r-- | guix-data-service/web/view/html.scm | 118 |
1 files changed, 75 insertions, 43 deletions
diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm index a5c5c80..ebf2c20 100644 --- a/guix-data-service/web/view/html.scm +++ b/guix-data-service/web/view/html.scm @@ -81,7 +81,7 @@ "source code here") "."))))) #:extra-headers ,extra-headers)) -(define (index guix-revisions) +(define (index guix-revisions queued-guix-revisions) (layout #:extra-headers '((cache-control . ((max-age . 60)))) @@ -89,48 +89,80 @@ `(,(header) (div (@ (class "container")) - (h1 "Guix Data Service") - (form (@ (id "compare") - (action "/compare")) - (div - (@ (class "form-group")) - (label (@ (for "base_commit")) - "Base commit") - (input (@ (type "text") - (class "form-control") - (id "base_commit") - (name "base_commit") - (placeholder "base commit")))) - (div - (@ (class "form-group")) - (label (@ (for "target_commit")) - "Target commit") - (input (@ (type "text") - (class "form-control") - (id "target_commit") - (name "target_commit") - (placeholder "target commit")))) - (button - (@ (type "submit") - (class "btn btn-lg btn-primary")) - "Compare")) - (h3 "Recent fetched revisions") - ,(if (null? guix-revisions) - '(p "No revisions") - `(table - (@ (class "table")) - (thead - (tr - (th (@ (class "col-md-6")) "Source Repository URL") - (th (@ (class "col-md-6")) "Commit"))) - (tbody - ,@(map - (match-lambda - ((id url commit store_path) - `(tr - (td ,url) - (td (samp ,commit))))) - guix-revisions)))))))) + (div + (@ (class "row")) + (h1 "Guix Data Service")) + (div + (@ (class "row")) + (form + (@ (id "compare") + (action "/compare")) + (div + (@ (class "col-md-6")) + (div + (@ (class "form-group")) + (label (@ (for "base_commit")) + "Base commit") + (input (@ (type "text") + (class "form-control") + (id "base_commit") + (name "base_commit") + (placeholder "base commit")))) + (div + (@ (class "form-group")) + (label (@ (for "target_commit")) + "Target commit") + (input (@ (type "text") + (class "form-control") + (id "target_commit") + (name "target_commit") + (placeholder "target commit"))))) + (div + (@ (class "col-md-6")) + (button + (@ (type "submit") + (class "btn btn-lg btn-primary")) + "Compare")))) + (div + (@ (class "row")) + (h3 "Recent fetched revisions") + ,(if (null? guix-revisions) + '(p "No revisions") + `(table + (@ (class "table")) + (thead + (tr + (th (@ (class "col-md-6")) "Source Repository URL") + (th (@ (class "col-md-6")) "Commit"))) + (tbody + ,@(map + (match-lambda + ((id url commit store_path) + `(tr + (td ,url) + (td (samp ,commit))))) + guix-revisions))))) + (div + (@ (class "row")) + (h3 "Queued revisions") + ,(if (null? queued-guix-revisions) + '(p "No queued revisions") + `(table + (@ (class "table")) + (thead + (tr + (th (@ (class "col-md-4")) "Source Repository URL") + (th (@ (class "col-md-4")) "Commit") + (th (@ (class "col-md-4")) "Source"))) + (tbody + ,@(map + (match-lambda + ((id url commit source) + `(tr + (td ,url) + (td (samp ,commit)) + (td ,source)))) + queued-guix-revisions))))))))) (define (compare base-commit target-commit |