public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/, htdocs/
@ 2016-12-05  7:34 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2016-12-05  7:34 UTC (permalink / raw
  To: gentoo-commits

commit:     f12592f37eacbcf525e9ff8bde379b4822628bf8
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Dec  5 07:34:18 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Dec  5 07:34:18 2016 +0000
URL:        https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=f12592f3

pkgcheck2html: move CSS to htdocs

 pkgcheck2html/output.css => htdocs/pkgcheck2html.css | 0
 pkgcheck2html/output.html.jinja                      | 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgcheck2html/output.css b/htdocs/pkgcheck2html.css
similarity index 100%
rename from pkgcheck2html/output.css
rename to htdocs/pkgcheck2html.css

diff --git a/pkgcheck2html/output.html.jinja b/pkgcheck2html/output.html.jinja
index 2e44619..e04d27e 100644
--- a/pkgcheck2html/output.html.jinja
+++ b/pkgcheck2html/output.html.jinja
@@ -3,7 +3,7 @@
 	<head>
 		<meta charset="utf-8"/>
 		<title>Gentoo CI - QA check results</title>
-		<link rel="stylesheet" type="text/css" href="output.css" />
+		<link rel="stylesheet" type="text/css" href="/pkgcheck2html.css" />
 	</head>
 
 	<body>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/, htdocs/
@ 2017-12-17 16:59 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2017-12-17 16:59 UTC (permalink / raw
  To: gentoo-commits

commit:     1d281c78d02de7a55fc918aa414d7e9620d8e101
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 17 16:59:49 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec 17 16:59:49 2017 +0000
URL:        https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=1d281c78

pkgcheck2html: Group results by class

 htdocs/pkgcheck2html.css        |  8 ++++++++
 pkgcheck2html/output.html.jinja | 21 +++++++++++++++------
 pkgcheck2html/pkgcheck2html.py  | 14 +++++++++-----
 3 files changed, 32 insertions(+), 11 deletions(-)

diff --git a/htdocs/pkgcheck2html.css b/htdocs/pkgcheck2html.css
index eb17b19..44862ce 100644
--- a/htdocs/pkgcheck2html.css
+++ b/htdocs/pkgcheck2html.css
@@ -171,6 +171,14 @@ tr.warn td:hover
 	text-overflow: ellipsis;
 }
 
+li.heading
+{
+	font-size: 125%;
+	color: white;
+	background-color: #463C65;
+	padding-left: .75em;
+}
+
 .warn a
 {
 	color: orange;

diff --git a/pkgcheck2html/output.html.jinja b/pkgcheck2html/output.html.jinja
index f8d6bf5..80c5167 100644
--- a/pkgcheck2html/output.html.jinja
+++ b/pkgcheck2html/output.html.jinja
@@ -14,14 +14,23 @@
 				<h2>issues</h2>
 
 				<ul>
-					{% for g in errors %}
-						<li class="err"><a href="#{{ g|join('/') }}">{{ g|join('/') }}</a></li>
+					{% for g, pkgs in errors %}
+						<li class="err heading">{{ g }}</li>
+						{% for pkg in pkgs %}
+							<li class="err"><a href="#{{ g|join('/') }}">{{ g|join('/') }}</a></li>
+						{% endfor %}
 					{% endfor %}
-					{% for g in warnings %}
-						<li class="warn"><a href="#{{ g|join('/') }}">{{ g|join('/') }}</a></li>
+					{% for g, pkgs in warnings %}
+						<li class="warn heading">{{ g }}</li>
+						{% for pkg in pkgs %}
+							<li class="warn"><a href="#{{ g|join('/') }}">{{ g|join('/') }}</a></li>
+						{% endfor %}
 					{% endfor %}
-					{% for g in staging %}
-						<li class="staging"><a href="#{{ g|join('/') }}">{{ g|join('/') }}</a></li>
+					{% for g, pkgs in staging %}
+						<li class="staging heading">{{ g }}</li>
+						{% for pkg in pkgs %}
+							<li class="staging"><a href="#{{ pkg|join('/') }}">{{ pkg|join('/') }}</a></li>
+						{% endfor %}
 					{% endfor %}
 				</ul>
 			</div>

diff --git a/pkgcheck2html/pkgcheck2html.py b/pkgcheck2html/pkgcheck2html.py
index da5dee5..ffdf76a 100755
--- a/pkgcheck2html/pkgcheck2html.py
+++ b/pkgcheck2html/pkgcheck2html.py
@@ -4,6 +4,7 @@
 # 2-clause BSD license
 
 import argparse
+import collections
 import datetime
 import io
 import json
@@ -77,11 +78,14 @@ def deep_group(it, level = 1):
 
 
 def find_of_class(it, cls, level = 2):
+    out = collections.defaultdict(set)
+
     for g, r in group_results(it, level):
         for x in r:
             if x.css_class == cls:
-                yield g
-                break
+                out[getattr(x, 'class')].add(g)
+
+    return [(k, sorted(v)) for k, v in sorted(out.items())]
 
 
 def get_result_timestamp(paths):
@@ -125,9 +129,9 @@ def main(*args):
 
     out = t.render(
         results = deep_group(results),
-        warnings = list(find_of_class(results, 'warn')),
-        staging = list(find_of_class(results, 'staging')),
-        errors = list(find_of_class(results, 'err')),
+        warnings = find_of_class(results, 'warn'),
+        staging = find_of_class(results, 'staging'),
+        errors = find_of_class(results, 'err'),
         ts = ts,
     )
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-17 17:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-17 16:59 [gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/, htdocs/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2016-12-05  7:34 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox