[Piuparts-devel] [Git][debian/piuparts][develop] 5 commits: dry refactoring
Holger Levsen
gitlab at salsa.debian.org
Sat Oct 13 16:39:21 BST 2018
Holger Levsen pushed to branch develop at Debian / piuparts
Commits:
049ad549 by Holger Levsen at 2018-10-13T14:59:30Z
dry refactoring
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
d0a59057 by Holger Levsen at 2018-10-13T15:04:24Z
fix page_title for bug_howto.html
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
320c7ea9 by Holger Levsen at 2018-10-13T15:35:30Z
piuparts-report.py: add new page: overview.html
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
27c7b9f1 by Holger Levsen at 2018-10-13T15:37:00Z
dry refactoring
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
793cac59 by Holger Levsen at 2018-10-13T15:39:01Z
also document minor changes
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
2 changed files:
- debian/changelog
- piuparts-report.py
Changes:
=====================================
debian/changelog
=====================================
@@ -18,6 +18,11 @@ piuparts (0.93) UNRELEASED; urgency=medium
only enable it for the distros that actually need it.
* Overhaul some exceptions.
+ [ Holger Levsen ]
+ * piuparts-report.py:
+ - Add new page: overview.html
+ - Minor cleanups.
+
-- Holger Levsen <holger at debian.org> Sat, 22 Sep 2018 15:32:55 +0200
piuparts (0.92) unstable; urgency=medium
=====================================
piuparts-report.py
=====================================
@@ -344,14 +344,7 @@ $rows
</table>
"""
-
-SOURCE_PACKAGE_BODY_TEMPLATE = """
- <table class="righttable">
-$rows
- </table>
-"""
-
-ANALYSIS_BODY_TEMPLATE = """
+BASIC_BODY_TEMPLATE = """
<table class="righttable">
$rows
</table>
@@ -1230,7 +1223,7 @@ class Section:
self._write_template_html(
os.path.join(source_summary_page_path, (source + ".html")),
- SOURCE_PACKAGE_BODY_TEMPLATE,
+ BASIC_BODY_TEMPLATE,
{
"page_title": html_protect("Status of source package " + source + " in " + self._config.section),
"rows": sourcerows + binaryrows,
@@ -1347,7 +1340,7 @@ class Section:
self._write_template_html(
os.path.join(self._output_directory, template[:-len(".tpl")] + ".html"),
- ANALYSIS_BODY_TEMPLATE,
+ BASIC_BODY_TEMPLATE,
{
"page_title": html_protect("Packages in state " + state + " " + linktarget),
"rows": rows,
@@ -1840,17 +1833,41 @@ def main():
# static pages
logging.debug("Writing static pages")
+ section_navigation = create_section_navigation(section_names, "sid", doc_root)
for page in ("index", "bug_howto"):
tpl = os.path.join(output_directory, page + ".tpl")
INDEX_BODY = read_file(tpl)
+ if page == 'index':
+ page_title = "About piuparts.debian.org and News"
+ else:
+ page_title = "How to file bugs based on piuparts.d.o results"
write_template_html(
os.path.join(output_directory, page + ".html"),
INDEX_BODY,
{
- "page_title": "About piuparts.debian.org and News",
- "section_navigation": create_section_navigation(section_names, "sid", doc_root),
+ "page_title": page_title,
+ "section_navigation": section_navigation,
"doc_root": doc_root,
})
+ # overview page
+ rows = "<tr>"
+ counter = 0
+ for section in section_names:
+ counter += 1
+ rows += ("<td><img src=\"/%s/states.png\" height=\"150\" width=\"266\" alt=\"Binary package states in %s\"></td>") % \
+ (section, section)
+ if counter % 4 == 0:
+ rows += "</tr><tr>"
+ rows += "</tr>"
+ write_template_html(
+ os.path.join(output_directory, "overview.html"),
+ BASIC_BODY_TEMPLATE,
+ {
+ "page_title": "Overview of suites tested by piuparts.debian.org",
+ "section_navigation": section_navigation,
+ "doc_root": doc_root,
+ "rows": rows,
+ })
# create graph about bugs filed
try:
make_bts_stats_graph(master_directory, output_directory);
View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/1ffcf128c3b6bf1da637792483d0dbedb92e93e7...793cac5935a2f68338221a8eb49f2a9fe5908d72
--
View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/1ffcf128c3b6bf1da637792483d0dbedb92e93e7...793cac5935a2f68338221a8eb49f2a9fe5908d72
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/piuparts-devel/attachments/20181013/7883272c/attachment-0001.html>
More information about the Piuparts-devel
mailing list