summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2016-05-18 23:04:49 +0200
committerHolger Levsen <holger@layer-acht.org>2016-05-18 23:04:49 +0200
commitec7d8f8d5ea8a2690cdd8251943cd5e1372682e0 (patch)
tree8c0f51f25e937682e4c6d765e7b4b062500a5134 /bin
parent91f45a9c749e10cd3c9eac6062a89072721ecbeb (diff)
downloadjenkins.debian.net-ec7d8f8d5ea8a2690cdd8251943cd5e1372682e0.tar.xz
reproducible debian: right align table cells by default, provide css classes for left and center alignment
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_html_dashboard.sh60
-rwxr-xr-xbin/reproducible_html_live_status.py14
-rwxr-xr-xbin/reproducible_html_notes.py22
-rwxr-xr-xbin/reproducible_html_packages.py2
-rwxr-xr-xbin/reproducible_html_repository_comparison.sh4
5 files changed, 51 insertions, 51 deletions
diff --git a/bin/reproducible_html_dashboard.sh b/bin/reproducible_html_dashboard.sh
index 96a3155a..43c8b39c 100755
--- a/bin/reproducible_html_dashboard.sh
+++ b/bin/reproducible_html_dashboard.sh
@@ -278,7 +278,7 @@ write_usertag_table() {
let "REPRODUCIBLE_TTOTAL=REPRODUCIBLE_TOPEN+REPRODUCIBLE_TDONE"
write_page "<tr><td>Sum of <a href=\"https://wiki.debian.org/ReproducibleBuilds/Contribute#How_to_report_bugs\">bugs with usertags related to reproducible builds</a>, excluding those tagged 'ftbfs'</td><td>$REPRODUCIBLE_TOPEN</td><td>$REPRODUCIBLE_TDONE</td><td>$REPRODUCIBLE_TTOTAL</td></tr>"
write_page "<tr><td>Sum of all bugs with usertags related to reproducible builds</td><td>$TOPEN</td><td>$TDONE</td><td>$TTOTAL</td></tr>"
- write_page "<tr><td colspan=\"4\">Stats are from $DATE.<br />The sums of usertags shown are not equivalent to the sum of bugs as a single bug can have several tags.</td></tr>"
+ write_page "<tr><td colspan=\"4\" class=\"left\">Stats are from $DATE.<br />The sums of usertags shown are not equivalent to the sum of bugs as a single bug can have several tags.</td></tr>"
write_page "</table>"
fi
}
@@ -292,7 +292,7 @@ write_build_performance_stats() {
for ARCH in ${ARCHS} ; do
write_page " <th>$ARCH</th>"
done
- write_page "</tr><tr><td>oldest build result in testing / unstable / experimental</td>"
+ write_page "</tr><tr><td class=\"left\">oldest build result in testing / unstable / experimental</td>"
for ARCH in ${ARCHS} ; do
PERF_STATS[$ARCH]=$(mktemp -t reproducible-dashboard-perf-XXXXXXXX)
AGE_UNSTABLE=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT CAST(max(oldest_reproducible, oldest_unreproducible, oldest_FTBFS) AS INTEGER) FROM ${TABLE[2]} WHERE suite='unstable' AND architecture='$ARCH' AND datum='$DATE'")
@@ -300,7 +300,7 @@ write_build_performance_stats() {
AGE_TESTING=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT CAST(max(oldest_reproducible, oldest_unreproducible, oldest_FTBFS) AS INTEGER) FROM ${TABLE[2]} WHERE suite='testing' AND architecture='$ARCH' AND datum='$DATE'")
write_page "<td>$AGE_TESTING / $AGE_UNSTABLE / $AGE_EXPERIMENTAL days</td>"
done
- write_page "</tr><tr><td>average test duration (on $DATE)</td>"
+ write_page "</tr><tr><td class=\"left\">average test duration (on $DATE)</td>"
for ARCH in ${ARCHS} ; do
RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT CAST(AVG(r.build_duration) AS INTEGER) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE r.build_duration!='' AND r.build_duration!='0' AND r.build_date LIKE '%$DATE%' AND s.architecture='$ARCH'")
MIN=$(echo $RESULT/60|bc)
@@ -309,24 +309,24 @@ write_build_performance_stats() {
done
local TIMESPAN_VERBOSE="4 weeks"
local TIMESPAN_RAW="28"
- write_page "</tr><tr><td>average test duration (in the last $TIMESPAN_VERBOSE)</td>"
+ write_page "</tr><tr><td class=\"left\">average test duration (in the last $TIMESPAN_VERBOSE)</td>"
for ARCH in ${ARCHS} ; do
RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT CAST(AVG(r.build_duration) AS INTEGER) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE r.build_duration!='' AND r.build_duration!='0' AND r.build_date > datetime('$DATE', '-$TIMESPAN_RAW days') AND s.architecture='$ARCH'")
MIN=$(echo $RESULT/60|bc)
SEC=$(echo "$RESULT-($MIN*60)"|bc)
write_page "<td>$MIN minutes, $SEC seconds</td>"
done
- write_page "</tr><tr><td>packages tested on $DATE</td>"
+ write_page "</tr><tr><td class=\"left\">packages tested on $DATE</td>"
for ARCH in ${ARCHS} ; do
RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT COUNT(r.build_date) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE r.build_date LIKE '%$DATE%' AND s.architecture='$ARCH'")
write_page "<td>$RESULT</td>"
done
- write_page "</tr><tr><td>packages tested in the last 24h</td>"
+ write_page "</tr><tr><td class=\"left\">packages tested in the last 24h</td>"
for ARCH in ${ARCHS} ; do
RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT COUNT(r.build_date) FROM stats_build AS r WHERE r.build_date > datetime('$(date -u '+%Y-%m-%d %H:%m')', '-24 hours') AND r.architecture='$ARCH'")
write_page "<td>$RESULT</td>"
done
- write_page "</tr><tr><td>packages tested on average per day in the last $TIMESPAN_VERBOSE</td>"
+ write_page "</tr><tr><td class=\"left\">packages tested on average per day in the last $TIMESPAN_VERBOSE</td>"
for ARCH in ${ARCHS} ; do
RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT COUNT(r.build_date) FROM stats_build AS r WHERE r.build_date > datetime('$DATE', '-$TIMESPAN_RAW days') AND r.architecture='$ARCH'")
RESULT="$(echo $RESULT/$TIMESPAN_RAW|bc)"
@@ -334,7 +334,7 @@ write_build_performance_stats() {
done
local TIMESPAN_VERBOSE="3 months"
local TIMESPAN_RAW="91.5"
- write_page "</tr><tr><td>packages tested on average per day in the last $TIMESPAN_VERBOSE</td>"
+ write_page "</tr><tr><td class=\"left\">packages tested on average per day in the last $TIMESPAN_VERBOSE</td>"
for ARCH in ${ARCHS} ; do
if [ "$ARCH" = "i386" ] ; then
RESULT="&nbsp;"
@@ -354,29 +354,29 @@ write_suite_arch_table() {
local SUITE=""
local ARCH=""
write_page "<p>"
- write_page "<table class=\"main\"><tr><th>suite</th><th>all sources packages</th><th>"
+ write_page "<table class=\"main\"><tr><th class=\"left\">suite</th><th class=\"center\">all sources packages</th><th class=\"center\">"
set_icon reproducible
write_icon
- write_page "reproducible packages</th><th>"
+ write_page "reproducible packages</th><th class=\"center\">"
set_icon unreproducible
write_icon
- write_page "unreproducible packages</th><th>"
+ write_page "unreproducible packages</th><th class=\"center\">"
set_icon FTBFS
write_icon
- write_page "packages failing to build</th><th>"
+ write_page "packages failing to build</th><th class=\"center\">"
set_icon depwait
write_icon
- write_page "packages in depwait state</th><th>"
+ write_page "packages in depwait state</th><th class=\"center\">"
set_icon not_for_us
write_icon
- write_page "not for this architecture</th><th>"
+ write_page "not for this architecture</th><th class=\"center\">"
set_icon blacklisted
write_icon
write_page "blacklisted</th></tr>"
for SUITE in $SUITES ; do
for ARCH in ${ARCHS} ; do
gather_suite_arch_stats
- write_page "<tr><td>$SUITE/$ARCH</td><td>$AMOUNT"
+ write_page "<tr><td class=\"left\">$SUITE/$ARCH</td><td>$AMOUNT"
if [ $(echo $PERCENT_TOTAL/1|bc) -lt 99 ] ; then
write_page "<span style=\"font-size:0.8em;\">($PERCENT_TOTAL% tested)</span>"
fi
@@ -480,23 +480,23 @@ create_dashboard_page() {
done
write_page "</p>"
# write inventory table
- write_page "<p><table class=\"main\"><tr><th>Various reproducibility statistics</th><th>source based</th>"
+ write_page "<p><table class=\"main\"><tr><th class=\"left\">Various reproducibility statistics</th><th class=\"center\">source based</th>"
AC=0
for ARCH in ${ARCHS} ; do
- write_page "<th>$ARCH</th>"
+ write_page "<th class=\"center\">$ARCH</th>"
let AC+=1
done
write_page "</tr>"
ARCH="amd64"
- write_page "<tr><td>identified <a href=\"/index_issues.html\">distinct and categorized issues</a></td><td>$ISSUES</td><td colspan=\"$AC\"></td></tr>"
- write_page "<tr><td>total number of identified issues in packages</td><td>$COUNT_ISSUES</td><td colspan=\"$AC\"></td></tr>"
- write_page "<tr><td>packages with notes about these issues</td><td>$NOTES</td><td colspan=\"$AC\"></td></tr>"
+ write_page "<tr><td class=\"left\">identified <a href=\"/index_issues.html\">distinct and categorized issues</a></td><td>$ISSUES</td><td colspan=\"$AC\"></td></tr>"
+ write_page "<tr><td class=\"left\">total number of identified issues in packages</td><td>$COUNT_ISSUES</td><td colspan=\"$AC\"></td></tr>"
+ write_page "<tr><td class=\"left\">packages with notes about these issues</td><td>$NOTES</td><td colspan=\"$AC\"></td></tr>"
- local TD_PKG_NOISSUES="<tr><td>packages in unstable with issues but without identified ones</td><td></td>"
- local TD_PKG_FTBR="<tr><td>&nbsp;&nbsp;- unreproducible ones</a></td><td></td>"
- local TD_PKG_FTBFS="<tr><td>&nbsp;&nbsp;- failing to build</a></td><td></td>"
- local TD_PKG_SID="<tr><td>packages in unstable which need to be fixed</td><td></td>"
- local TD_PKG_TESTING="<tr><td>&nbsp;&nbsp;- in testing</td><td></td>"
+ local TD_PKG_NOISSUES="<tr><td class=\"left\">packages in unstable with issues but without identified ones</td><td></td>"
+ local TD_PKG_FTBR="<tr><td class=\"left\">&nbsp;&nbsp;- unreproducible ones</a></td><td></td>"
+ local TD_PKG_FTBFS="<tr><td class=\"left\">&nbsp;&nbsp;- failing to build</a></td><td></td>"
+ local TD_PKG_SID="<tr><td class=\"left\">packages in unstable which need to be fixed</td><td></td>"
+ local TD_PKG_TESTING="<tr><td class=\"left\">&nbsp;&nbsp;- in testing</td><td></td>"
for ARCH in ${ARCHS} ; do
SUITE="unstable"
gather_suite_arch_stats
@@ -523,20 +523,20 @@ create_dashboard_page() {
# insane grep to filter people who committed with several
# usernames…
if [ -f ${NOTES_GIT_PATH}/packages.yml ] && [ -f ${NOTES_GIT_PATH}/issues.yml ] ; then
- write_page "<tr><td>committers to <a href=\"https://anonscm.debian.org/git/reproducible/notes.git\" target=\"_parent\">notes.git</a> (in the last three months)</td><td>$(cd ${NOTES_GIT_PATH} ; git log --since="3 months ago"|grep Author|sort -u | \
+ write_page "<tr><td class=\"left\">committers to <a href=\"https://anonscm.debian.org/git/reproducible/notes.git\" target=\"_parent\">notes.git</a> (in the last three months)</td><td>$(cd ${NOTES_GIT_PATH} ; git log --since="3 months ago"|grep Author|sort -u | \
grep -v alexis@passoire.fr | grep -v christoph.berg@credativ.de | grep -v d.s@daniel.shahaf.name | grep -v dhole@openmailbox.com | grep -v jelmer@jelmer.uk | grep -v mattia@mapreri.org | grep -v micha@lenk.info | grep -v mail@sandroknauss.de | grep -v sanvila@unex.es | \
wc -l)</td><td colspan=\"$AC\"></td></tr>"
- write_page "<tr><td>committers to notes.git (in total)</td><td>$(cd ${NOTES_GIT_PATH} ; git log |grep Author|sort -u | \
+ write_page "<tr><td class=\"left\">committers to notes.git (in total)</td><td>$(cd ${NOTES_GIT_PATH} ; git log |grep Author|sort -u | \
grep -v alexis@passoire.fr | grep -v christoph.berg@credativ.de | grep -v d.s@daniel.shahaf.name | grep -v dhole@openmailbox.com | grep -v jelmer@jelmer.uk | grep -v mattia@mapreri.org | grep -v micha@lenk.info | grep -v mail@sandroknauss.de | grep -v sanvila@unex.es | \
wc -l)</td><td colspan=\"$AC\"></td></tr>"
fi
RESULT=$(cat /srv/reproducible-results/modified_in_sid.txt || echo "unknown") # written by reproducible_html_repository_comparison.sh
- write_page "<tr><td>packages <a href=\"/index_repositories.html\">modified in our toolchain</a> (in unstable)</td><td>$(echo $RESULT)</td><td colspan=\"$AC\"></td></tr>"
+ write_page "<tr><td class=\"left\">packages <a href=\"/index_repositories.html\">modified in our toolchain</a> (in unstable)</td><td>$(echo $RESULT)</td><td colspan=\"$AC\"></td></tr>"
RESULT=$(cat /srv/reproducible-results/modified_in_exp.txt || echo "unknown") # written by reproducible_html_repository_comparison.sh
- write_page "<tr><td>&nbsp;&nbsp;- (in experimental)</td><td>$(echo $RESULT)</td><td colspan=\"$AC\"></td></tr>"
+ write_page "<tr><td class=\"left\">&nbsp;&nbsp;- (in experimental)</td><td>$(echo $RESULT)</td><td colspan=\"$AC\"></td></tr>"
RESULT=$(cat /srv/reproducible-results/binnmus_needed.txt || echo "unknown") # written by reproducible_html_repository_comparison.sh
if [ "$RESULT" != "0" ] ; then
- write_page "<tr><td>&nbsp;&nbsp;- which need to be build on some archs</td><td>$(echo $RESULT)</td><td colspan=\"$AC\"></td></tr>"
+ write_page "<tr><td class=\"left\">&nbsp;&nbsp;- which need to be build on some archs</td><td>$(echo $RESULT)</td><td colspan=\"$AC\"></td></tr>"
fi
write_page "</table>"
# write bugs with usertags table
diff --git a/bin/reproducible_html_live_status.py b/bin/reproducible_html_live_status.py
index cea570d5..07224d95 100755
--- a/bin/reproducible_html_live_status.py
+++ b/bin/reproducible_html_live_status.py
@@ -15,7 +15,7 @@ import glob
def convert_into_status_html(status):
if status != 'None':
status, icon, spokenstatus = get_status_icon(status)
- return '<img src="/static/' + icon +'" alt="' + status + '" title="' + status + '"/> ' + status
+ return status + ' <img src="/static/' + icon +'" alt="' + status + '" title="' + status + '"/>'
else:
return ''
@@ -36,8 +36,8 @@ def generate_schedule(arch):
html += build_leading_text_section({'text': text}, rows, defaultsuite, arch)
html += generate_live_status_table(arch)
html += '<p><table class="scheduled">\n' + tab
- html += '<tr><th>#</th><th>scheduled at</th><th>suite</th>'
- html += '<th>arch</th><th>source package</th><th>previous build status</th><th>previous build duration</th><th>average build duration</th></tr>\n'
+ html += '<tr><th class="center">#</th><th class="center">scheduled at</th><th class="center">suite</th>'
+ html += '<th class="center">arch</th><th class="center">source package</th><th class="center">previous build status</th><th class="center">previous build duration</th><th class="center">average build duration</th></tr>n'
bugs = get_bugs()
for row in rows:
# 0: date_scheduled, 1: suite, 2: arch, 3: pkg name 4: previous status 5: previous build duration 6. avg build duration
@@ -66,10 +66,10 @@ def generate_live_status_table(arch):
html = ''
rows = query_db(query.format(arch=arch))
html += '<p><table class="scheduled">\n' + tab
- html += '<tr><th>#</th><th>src pkg id</th><th>suite</th><th>arch</th>'
- html += '<th>source package</th><th>version</th></th>'
- html += '<th>build started</th><th>previous build status</th>'
- html += '<th>previous build duration</th><th>average build duration</th><th>builder job</th>'
+ html += '<tr><th class="center">#</th><th class="center">src pkg id</th><th class="center">suite</th><th class="center">arch</th>'
+ html += '<th class=\"center\">source package</th><th class=\"center\">version</th></th>'
+ html += '<th class=\"center\">build started</th><th class=\"center\">previous build status</th>'
+ html += '<th class=\"center\">previous build duration</th><th class=\"center\">average build duration</th><th class=\"center\">builder job</th>'
html += '</tr>\n'
counter = 0
# the path should probably not be hard coded here…
diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py
index 6bd1551e..94b95b46 100755
--- a/bin/reproducible_html_notes.py
+++ b/bin/reproducible_html_notes.py
@@ -45,7 +45,7 @@ note_issues_html = Template((tab*3).join("""
<td>
Identified issues:
</td>
- <td>
+ <td class="left">
$issues
</td>
</tr>""".splitlines(True)))
@@ -55,7 +55,7 @@ note_bugs_html = Template((tab*4).join("""
<td>
Bugs noted:
</td>
- <td>
+ <td class="left">
$bugs
</td>
</tr>""".splitlines(True)))
@@ -65,7 +65,7 @@ note_comments_html = Template((tab*3).join("""
<td>
Comments:
</td>
- <td>
+ <td class="left">
$comments
</td>
</tr>""".splitlines(True)))
@@ -75,7 +75,7 @@ note_issue_html_url = Template((tab*6).join("""
<td>
URL
</td>
- <td>
+ <td class="left">
<a href="$url" target="_blank">$url</a>
</td>
</tr>""".splitlines(True)))
@@ -85,7 +85,7 @@ note_issue_html_desc = Template((tab*6).join("""
<td>
Description
</td>
- <td>
+ <td class="left">
$description
</td>
</tr>""".splitlines(True)))
@@ -96,7 +96,7 @@ note_issue_html = Template((tab*5).join(("""
<td>
Identifier:
</td>
- <td>
+ <td class="left">
<a href="%s/${issue}_issue.html" target="_parent">$issue</a>
</td>
</tr>
@@ -109,7 +109,7 @@ issue_html_url = Template((tab*4).join("""
<td>
URL:
</td>
- <td>
+ <td class="left">
<a href="$url">$url</a>
</td>
</tr>""".splitlines(True)))
@@ -120,7 +120,7 @@ issue_html = Template((tab*3).join("""
<td style="min-width: 15%">
Identifier:
</td>
- <th>
+ <th class="left">
$issue
</th>
</tr>
@@ -128,7 +128,7 @@ issue_html = Template((tab*3).join("""
<td>
Suites:
</td>
- <td>
+ <td class="left">
$suite_links
</td>
</tr>
@@ -137,7 +137,7 @@ issue_html = Template((tab*3).join("""
<td>
Description:
</td>
- <td>
+ <td class="left">
$description
</td>
</tr>
@@ -145,7 +145,7 @@ issue_html = Template((tab*3).join("""
<td>
Packages in '$suite' known to be affected by this issue:
</td>
- <td>
+ <td class="left">
$affected_pkgs
</td>
</tr>
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index ce01db6d..7c55a266 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -220,7 +220,7 @@ def gen_history_page(package):
record['node2'] = shorten_if_debiannet(record['node2'])
# add icon to result
status, icon, spokenstatus = get_status_icon(record['result'])
- result_html = '<img src="/static/{icon}" alt="{spokenstatus}" title="{spokenstatus}"/> ' + spokenstatus
+ result_html = spokenstatus + ' <img src="/static/{icon}" alt="{spokenstatus}" title="{spokenstatus}"/>'
record['result'] = result_html.format(icon=icon, spokenstatus=spokenstatus)
# human formatting of build duration
record['build duration'] = convert_into_hms_string(
diff --git a/bin/reproducible_html_repository_comparison.sh b/bin/reproducible_html_repository_comparison.sh
index db6a40ac..c3ee6742 100755
--- a/bin/reproducible_html_repository_comparison.sh
+++ b/bin/reproducible_html_repository_comparison.sh
@@ -44,7 +44,7 @@ write_page "<p>These source packages (and their binaries packages) are different
write_page "deb http://reproducible.alioth.debian.org/debian/ ./"
write_page "deb-src http://reproducible.alioth.debian.org/debian/ ./"
write_page "</pre></p>"
-write_page "<p><table><tr><th>package</th><th>git repo</th><th>PTS link</th><th>usertagged bug</th><th>old versions in our repo<br />(needed for reproducing old builds)</th><th>version in our repo<br />(available binary packages per architecture)</th><th>version in 'testing'</th><th>version in 'unstable'</th><th>version in 'experimental'</th></tr>"
+write_page "<p><table><tr><th class=\"center\">package</th><th class=\"center\">git repo</th><th class=\"center\">PTS link</th><th class=\"center\">usertagged bug</th><th class=\"center\">old versions in our repo<br />(needed for reproducing old builds)</th><th class=\"center\">version in our repo<br />(available binary packages per architecture)</th><th class=\"center\">version in 'testing'</th><th class=\"center\">version in 'unstable'</th><th class=\"center\">version in 'experimental'</th></tr>"
custom_curl http://reproducible.alioth.debian.org/debian/Sources $SOURCES
custom_curl http://reproducible.alioth.debian.org/debian/Packages $PACKAGES
@@ -234,7 +234,7 @@ for PKG in $SOURCEPKGS ; do
done
cat $TABLE_TODO >> $PAGE
write_page "</table></p>"
-write_page "<p><table><tr><th>package (obsolete in our repo)</th><th>git repo</th><th>PTS link</th><th>usertagged bug</th><th>old versions in our repo<br />(needed for reproducing old builds)</th><th>version in our repo<br />(available binary packages per architecture)</th><th>version in 'testing'</th><th>version in 'unstable'</th><th>version in 'experimental'</th></tr>"
+write_page "<p><table><tr><th class=\"center\">obsoleted package,<br />version in sid higher than in our repo</th><th class=\"center\">git repo</th><th class=\"center\">PTS link</th><th class=\"center\">usertagged bug</th><th class=\"center\">old version(s) in our repo<br />(needed for reproducing old builds)</th><th class=\"center\">version in our repo<br />(available binary packages per architecture)</th><th class=\"center\">version in 'testing'</th><th class=\"center\">version in 'unstable'</th><th class=\"center\">version in 'experimental'</th></tr>"
cat $TABLE_DONE >> $PAGE
write_page "</table></p>"
write_page_footer