[Treepkg-commits] r75 - in trunk: . treepkg
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Jun 9 12:51:28 CEST 2008
Author: bh
Date: 2008-06-09 12:51:28 +0200 (Mon, 09 Jun 2008)
New Revision: 75
Added:
trunk/web/
Removed:
trunk/treepkg/web-status.html
Modified:
trunk/treepkg/web.py
Log:
Move the default template for the status web page to the new directory
web/ and rename it to status-by-revision.html
Deleted: trunk/treepkg/web-status.html
===================================================================
--- trunk/treepkg/web-status.html 2008-06-05 12:34:55 UTC (rev 74)
+++ trunk/treepkg/web-status.html 2008-06-09 10:51:28 UTC (rev 75)
@@ -1,56 +0,0 @@
-<html xmlns:py="http://genshi.edgewall.org/">
- <head>
- <title>Tree Packager Status</title>
- <style type="text/css">
- .statustable { background:#F4F4F4; }
- .statustablehead { background:#E0E0E0; }
- .statusheading { font-weight:bold; }
- .finished { background:#C0FFC0; }
- .inprogress { background:#FFFFC0; }
- .error { background:#FFC0C0; }
- td { padding:5px; background:#FFFFFF}
- </style>
- </head>
- <body>
- <h1>Tree Packager Status</h1>
-
- <table class="statustable">
- <tr>
- <th class="statustablehead">Revision</th>
- <py:for each="track in report.revisions.tracks">
- <th class="statustablehead">${track.name}</th>
- </py:for>
- </tr>
-
- <py:for each="row in report.revisions.sorted_by_revision">
- <tr>
- <td>${row[0]}</td>
- <py:for each="col in row[1]">
- <py:choose>
- <py:when test="col">
- <td class="${col.status.cls}">
- <span class="statusheading">${col.status.desc}</span><br/>
- Start: ${col.status.start}<br/>
- Stop: ${col.status.stop}<br/>
- <py:for each="title, basename in col.log_files">
- <a href="${col.name}/${col.revno}/${basename}">${title}</a>
- <br/>
- </py:for>
- </td>
- </py:when>
- <py:otherwise>
- <td></td>
- </py:otherwise>
- </py:choose>
- </py:for>
-
- </tr>
- </py:for>
- </table>
-
- <hr/>
- report generated at ${report.date},
- powered by <a href="http://treepkg.wald.intevation.org/">Tree Packager</a>
-
- </body>
-</html>
Modified: trunk/treepkg/web.py
===================================================================
--- trunk/treepkg/web.py 2008-06-05 12:34:55 UTC (rev 74)
+++ trunk/treepkg/web.py 2008-06-09 10:51:28 UTC (rev 75)
@@ -23,12 +23,14 @@
def __init__(self, treepkg_config):
self.treepkg_config = treepkg_config
- self.loader = TemplateLoader([os.path.dirname(__file__)])
+ self.loader = TemplateLoader([os.path.join(os.path.dirname(__file__),
+ os.path.pardir,
+ "web")])
@expose
def index(self):
group = report.get_packager_group(self.treepkg_config)
- tmpl = self.loader.load('web-status.html')
+ tmpl = self.loader.load('status-by-revision.html')
stream = tmpl.generate(report=report.prepare_report(group))
return stream.render('html')
More information about the Treepkg-commits
mailing list