From 3a7944997409f823a3026e65ab526bfd7b5e381b Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 31 Aug 2019 12:42:54 +0100 Subject: Display counts of lint warnings on the revision page --- guix-data-service/web/view/html.scm | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'guix-data-service/web/view/html.scm') diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm index 6203a3b..b8cad39 100644 --- a/guix-data-service/web/view/html.scm +++ b/guix-data-service/web/view/html.scm @@ -450,9 +450,29 @@ '()))))) jobs-and-events))))) +(define (view-revision/lint-warning-counts lint-warning-counts) + `((h3 "Lint warnings") + (table + (@ (class "table")) + (thead + (tr + (th "Linter") + (th "Count"))) + (tbody + ,@(map (match-lambda + ((name description network-dependent count) + `(tr + (td (span (@ (style "font-family: monospace; display: block;")) + ,name) + (p (@ (style "margin: 6px 0 0px;")) + ,description)) + (td ,count)))) + lint-warning-counts))))) + (define* (view-revision commit-hash packages-count git-repositories-and-branches derivations-count jobs-and-events + lint-warning-counts #:key (path-base "/revision/") header-text) (layout @@ -481,7 +501,8 @@ '() (view-revision/git-repositories git-repositories-and-branches commit-hash)) - ,@(view-revision/jobs-and-events jobs-and-events)) + ,@(view-revision/jobs-and-events jobs-and-events) + ,@(view-revision/lint-warning-counts lint-warning-counts)) (div (@ (class "col-md-6")) (h3 "Derivations") -- cgit v1.2.3