From b3bbb2b6e1a6be12d6567b2b3c7e669da70b9838 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Tue, 3 Mar 2015 00:51:23 +0100 Subject: reproducible: common: add suites links in the header. --- bin/reproducible_common.py | 10 ++++++++-- bin/reproducible_html_indexes.py | 2 +- bin/reproducible_html_packages.py | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'bin') 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("""
  • maintainers of unreproducible packages
  • package sets stats
  • sid stats
  • +$suite_links
  • repositories overview
  • reproducible stats
  • @@ -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 += '
  • suite: ' + i + '
  • ' 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: -- cgit v1.2.3-54-g00ecf