summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_html_pkg_sets.py
diff options
context:
space:
mode:
authorValerie R Young <spectranaut@riseup.net>2016-07-21 14:23:26 -0400
committerHolger Levsen <holger@layer-acht.org>2016-07-24 11:46:03 -0400
commit04ce1ef4e0778b6387739a4ba5b56fdbe90d0567 (patch)
tree8757848eaf8cd5f3d43c8f0871551fdaabddb251 /bin/reproducible_html_pkg_sets.py
parenta93cd8dbb2de5474ec20b728f09395575d81cac2 (diff)
downloadjenkins.debian.net-04ce1ef4e0778b6387739a4ba5b56fdbe90d0567.tar.xz
reproducible debian: decouple navigation and page writing logic
Decoupling the navigation and page writing logic made it easier to do the following: - fix a bug introduced by adding headers at the top of the mainbody div (fixed in this commit) - make package pages to use the same structure as all other pages that contain a left navigation (to do in future) Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin/reproducible_html_pkg_sets.py')
-rwxr-xr-xbin/reproducible_html_pkg_sets.py26
1 files changed, 18 insertions, 8 deletions
diff --git a/bin/reproducible_html_pkg_sets.py b/bin/reproducible_html_pkg_sets.py
index 7a81ac6c..dbdca135 100755
--- a/bin/reproducible_html_pkg_sets.py
+++ b/bin/reproducible_html_pkg_sets.py
@@ -143,12 +143,17 @@ def create_index_page(suite, arch):
"index_pkg_sets.html")
suite_arch_nav_template = DEBIAN_URI + \
'/{{suite}}/{{arch}}/index_pkg_sets.html'
+ left_nav_html = create_main_navigation(
+ suite=suite,
+ arch=arch,
+ displayed_page='pkg_set',
+ suite_arch_nav_template=suite_arch_nav_template,
+ ignore_experimental=True,
+ )
log.info("Creating pkgset index page for %s/%s.",
suite, arch)
- write_html_page(title=title, body=body, destfile=destfile, suite=suite,
- arch=arch, displayed_page='pkg_set',
- suite_arch_nav_template=suite_arch_nav_template,
- ignore_experimental=True)
+ write_html_page(title=title, body=body, destfile=destfile,
+ left_nav_html=left_nav_html)
def gen_other_arch_context(archs, suite, pkgset_name):
@@ -242,12 +247,17 @@ def create_pkgset_page_and_graphs(suite, arch, stats, pkgset_name):
page = "pkg_set_" + pkgset_name + ".html"
destfile = os.path.join(DEBIAN_BASE, suite, arch, page)
suite_arch_nav_template = DEBIAN_URI + '/{{suite}}/{{arch}}/' + page
+ left_nav_html = create_main_navigation(
+ suite=suite,
+ arch=arch,
+ displayed_page='pkg_set',
+ suite_arch_nav_template=suite_arch_nav_template,
+ ignore_experimental=True,
+ )
log.info("Creating meta pkgset page for %s in %s/%s.",
pkgset_name, suite, arch)
- write_html_page(title=title, body=html_body, destfile=destfile, suite=suite,
- arch=arch, displayed_page='pkg_set',
- suite_arch_nav_template=suite_arch_nav_template,
- ignore_experimental=True)
+ write_html_page(title=title, body=html_body, destfile=destfile,
+ left_nav_html=left_nav_html)
def create_pkgset_graph(png_file, suite, arch, pkgset_name):