summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-03-07 18:04:54 +0100
committerMattia Rizzolo <mattia@mapreri.org>2015-03-07 18:09:51 +0100
commit6d05972d4b1a3d50cb4f877ab20c6173902bc418 (patch)
treeb01e803ae60d99fe69a6fb9002ded4e96c55491a
parent0752cf66df4c1cf5b1fea023d64e6678353dc8ae (diff)
downloadjenkins.debian.net-6d05972d4b1a3d50cb4f877ab20c6173902bc418.tar.xz
reproducible: html_packages: add a status icon next to the suite link
-rwxr-xr-xbin/reproducible_html_packages.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index 91f7217f..9083013a 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -151,8 +151,8 @@ def gen_extra_links(package, version, suite, arch):
def gen_suites_links(package, suite):
html = ''
- query = 'SELECT s.suite, s.architecture ' + \
- 'FROM sources AS s ' + \
+ query = 'SELECT s.suite, s.architecture, r.status ' + \
+ 'FROM sources AS s LEFT JOIN results AS r ON r.package_id=s.id ' + \
'WHERE s.name="{pkg}"'.format(pkg=package)
results = query_db(query)
if len(results) < 1:
@@ -161,12 +161,15 @@ def gen_suites_links(package, suite):
if len(results) == 1:
return html
for i in results:
- # i[0]: suite, i[1]: arch
+ # i[0]: suite, i[1]: arch, i[2]: status (NULL if untested)
if i[0] == suite:
continue
+ status = 'untested' if not i[2] else i[2]
+ icon = '<img src="/static/{icon}" alt="{status}" title="{status}"/>\n'
+ html += icon.format(icon=join_status_icon(status)[1], status=status)
html += '<a href="' + RB_PKG_URI + '/' + i[0] + '/' + i[1] + '/' + \
- str(package) + '.html" target="_parent">' + i[0] + '</a>\n'
- return html
+ str(package) + '.html" target="_parent">' + i[0] + '</a>'
+ return tab*5 + (tab*7).join(html.splitlines(True))
def gen_packages_html(packages, suite=None, arch=None, no_clean=False, nocheck=False):