aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/web/view/html.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-08-31 12:42:54 +0100
committerChristopher Baines <mail@cbaines.net>2019-09-01 13:12:10 +0100
commit3a7944997409f823a3026e65ab526bfd7b5e381b (patch)
treeb17006942f8eb5629ab97011da1059e86404bb18 /guix-data-service/web/view/html.scm
parent75f2c19fc8df76f63b465de6690e1204862804d0 (diff)
downloaddata-service-3a7944997409f823a3026e65ab526bfd7b5e381b.tar
data-service-3a7944997409f823a3026e65ab526bfd7b5e381b.tar.gz
Display counts of lint warnings on the revision page
Diffstat (limited to 'guix-data-service/web/view/html.scm')
-rw-r--r--guix-data-service/web/view/html.scm23
1 files changed, 22 insertions, 1 deletions
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")