summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-03-03 00:51:23 +0100
committerHolger Levsen <holger@layer-acht.org>2015-03-03 00:51:59 +0100
commitb3bbb2b6e1a6be12d6567b2b3c7e669da70b9838 (patch)
treea049c78880816d96ec144658f71804ee67bd76c5
parent209419c8dbcafeb8eb99e49100225c30791cd623 (diff)
downloadjenkins.debian.net-b3bbb2b6e1a6be12d6567b2b3c7e669da70b9838.tar.xz
reproducible: common: add suites links in the header.
-rwxr-xr-xbin/reproducible_common.py10
-rwxr-xr-xbin/reproducible_html_indexes.py2
-rwxr-xr-xbin/reproducible_html_packages.py2
3 files changed, 10 insertions, 4 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index 0ec40fbf..f86daf05 100755
--- a/bin/reproducible_common.py
+++ b/bin/reproducible_common.py
@@ -163,6 +163,7 @@ html_head_page = Template((tab*2).join("""
<li><a href="index_dd-list.html">maintainers of unreproducible packages</a></li>
<li><a href="/index_pkg_sets.html">package sets stats</a></li>
<li><a href="index_suite_stats.html">sid stats</a></li>
+$suite_links
<li><a href="/index_repo_stats.html">repositories overview</a></li>
<li><a href="/reproducible.html">reproducible stats</a></li>
</ul>
@@ -191,18 +192,23 @@ def print_critical_message(msg):
log.critical(msg)
print('\n\n\n')
-def write_html_page(title, body, destfile, noheader=False, style_note=False, noendpage=False):
+def write_html_page(title, body, destfile, suite=None, noheader=False, style_note=False, noendpage=False):
now = datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M UTC')
html = ''
html += html_header.substitute(page_title=title)
if not noheader:
+ suite_links = ""
+ for i in SUITES:
+ if i != suite:
+ suite_links += '<li><a href="' + i +'">suite: ' + i + '</a></li>'
html += html_head_page.substitute(
page_title=title,
count_total=count_total,
amount=amount,
percent_total=percent_total,
count_good=count_good,
- percent_good=percent_good)
+ percent_good=percent_good,
+ suite_links=suite_links)
html += body
if style_note:
html += html_foot_page_style_note.substitute()
diff --git a/bin/reproducible_html_indexes.py b/bin/reproducible_html_indexes.py
index 6ef416aa..08bb7e61 100755
--- a/bin/reproducible_html_indexes.py
+++ b/bin/reproducible_html_indexes.py
@@ -342,7 +342,7 @@ def build_page(page, suite=None, arch=None):
destfile = BASE + '/' + suite + '/' + arch + '/index_' + page + '.html'
desturl = REPRODUCIBLE_URL + '/' + suite + '/' + arch + '/index_' + \
page + '.html'
- write_html_page(title=title, body=html, destfile=destfile, style_note=True)
+ write_html_page(title=title, body=html, destfile=destfile, suite=suite, style_note=True)
log.info('"' + title + '" now available at ' + desturl)
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index d5a74af0..8fa02cf7 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -170,7 +170,7 @@ def gen_packages_html(packages, suite='sid', arch='amd64', no_clean=False):
desturl = REPRODUCIBLE_URL + RB_PKG_URI + '/' + suite + '/' + \
arch + '/' + pkg + '.html'
title = pkg + ' - reproducible build results'
- write_html_page(title=title, body=html, destfile=destfile,
+ write_html_page(title=title, body=html, destfile=destfile, suite=suite,
noheader=True, noendpage=True)
log.info("Package page generated at " + desturl)
if not no_clean: