[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible debian: add popcon scores to mouseover text, and underline 1/4 of the most popular ones
Holger Levsen
holger at layer-acht.org
Sat Jun 11 14:31:23 UTC 2016
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit 9fcd21f8b5947cb4a6a988715a90a14680466785
Author: Ximin Luo <infinity0 at debian.org>
Date: Sat Jun 11 16:09:36 2016 +0200
reproducible debian: add popcon scores to mouseover text, and underline 1/4 of the most popular ones
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
bin/reproducible_html_notes.py | 9 ++++++++-
userContent/reproducible/static/style.css | 4 ++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py
index 131ca14..e26b071 100755
--- a/bin/reproducible_html_notes.py
+++ b/bin/reproducible_html_notes.py
@@ -410,7 +410,14 @@ def index_issues(issues, scorefuncs):
for scorefunc in scorefuncs.values():
html += tab*4 + '<td><b>' + str(scorefunc(issues_list)) + '</b></td>\n'
html += tab*4 + '<td>\n'
- html += tab*5 + ', '.join(issues_list) + '\n'
+ issues_with_popcon = sorted(popcon.package(*issues_list).items(), key=lambda p: p[0])
+ issues_by_popcon = sorted(issues_with_popcon, key=lambda p: p[1], reverse=True)
+ popular_packages = set([p[0] for p in issues_by_popcon[:int(len(issues_by_popcon)/4)]])
+ issue_strings = [
+ '<span %stitle="%s">%s</span>' % (
+ 'class="package-popular" ' if p[0] in popular_packages else '', p[1], p[0]
+ ) for p in issues_with_popcon]
+ html += tab*5 + ', '.join(issue_strings) + '\n'
html += tab*4 + '</td>\n'
html += tab*3 + '</tr>\n'
html += tab*2 + '</table>\n'
diff --git a/userContent/reproducible/static/style.css b/userContent/reproducible/static/style.css
index e870996..df09304 100644
--- a/userContent/reproducible/static/style.css
+++ b/userContent/reproducible/static/style.css
@@ -83,6 +83,10 @@ a.package:visited, a.noted:visited {
padding: 0.25em
}
+.package-popular {
+ text-decoration: underline;
+}
+
.build-time {
font-size: 0.9em;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list