[Qa-jenkins-scm] [jenkins.debian.net] 01/02: Support meta-refresh header
Holger Levsen
holger at moszumanska.debian.org
Fri Sep 11 08:40:38 UTC 2015
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit 3a36114f1f70fe80cec43b568eabd15e166f1c25
Author: Chris Lamb <lamby at debian.org>
Date: Thu Sep 10 22:25:31 2015 +0100
Support meta-refresh header
Signed-off-by: Chris Lamb <lamby at debian.org>
---
bin/reproducible_common.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index df8374c..38163ca 100755
--- a/bin/reproducible_common.py
+++ b/bin/reproducible_common.py
@@ -122,6 +122,7 @@ html_header = Template("""<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width" />
+ $meta_refresh
<link href="/static/style.css" type="text/css" rel="stylesheet" />
<title>$page_title</title>
</head>
@@ -281,14 +282,17 @@ def _gen_links(suite, arch):
return html
-def write_html_page(title, body, destfile, suite=defaultsuite, arch=defaultarch, noheader=False, style_note=False, noendpage=False, packages=False):
+def write_html_page(title, body, destfile, suite=defaultsuite, arch=defaultarch, noheader=False, style_note=False, noendpage=False, packages=False, refresh_every=None):
now = datetime.utcnow().strftime('%Y-%m-%d %H:%M UTC')
html = ''
# this removes the padding if we are writing a package page
padding = 'class="wrapper"' if packages else ''
+ meta_refresh = '<meta http-equiv="refresh" content="%d">' % \
+ refresh_every if refresh_every is not None else ''
html += html_header.substitute(
page_title=title,
- padding=padding)
+ padding=padding,
+ meta_refresh=meta_refresh)
if not noheader:
links = _gen_links(suite, arch)
html += html_head_page.substitute(
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list