Skip to content

Commit

Permalink
Merge commit '0fc8eade38879945b0f2193e37a08a061b8569e0' into jinja
Browse files Browse the repository at this point in the history
Conflicts:
	buildbot/status/web/grid.py
  • Loading branch information
marcus-sonestedt committed Dec 19, 2009
2 parents 8276d4b + 0fc8ead commit 89a5852
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions buildbot/status/web/grid.py
Expand Up @@ -55,6 +55,7 @@ def head(self, request):
head += '<meta http-equiv="refresh" content="%d">\n' % reload_time
return head


def build_cxt(self, request, build):
if not build:
return {}
Expand Down Expand Up @@ -247,10 +248,10 @@ def body(self, request):
sortedBuilderNames.sort()

cxt['sorted_builder_names'] = sortedBuilderNames
cxt['builder_builds'] = builder_builds = {}
cxt['builder_builds'] = builder_builds = []
cxt['builders'] = builders = []
cxt['range'] = range(len(stamps))

for bn in sortedBuilderNames:
builds = [None] * len(stamps)

Expand All @@ -267,7 +268,7 @@ def body(self, request):
build = build.getPreviousBuild()

builders.append(self.builder_cxt(request, builder))
builder_builds[bn] = map(lambda b: self.build_cxt(request, b), builds)
builder_builds.append(map(lambda b: self.build_cxt(request, b), builds))

template = request.site.buildbot_service.templates.get_template('grid_transposed.html')
data = template.render(**cxt)
Expand Down
2 changes: 1 addition & 1 deletion buildbot/status/web/templates/grid_macros.html
Expand Up @@ -36,7 +36,7 @@

{% macro build_td(build) -%}
<td class="build {{ build.class }}">
<a href="{{ build.url }}">{{ build.text|e|join('<br/>') }}</a>
<a href="{{ build.url }}">{{ build.text|join('<br/>') }}</a>
</td>
{%- endmacro %}

4 changes: 2 additions & 2 deletions buildbot/status/web/templates/grid_transposed.html
Expand Up @@ -14,8 +14,8 @@
{% for i in range %}
<tr>
{{ grid.stamp_td(stamps[i]) }}
{% for bn in sorted_builder_names %}
{{ grid.build_td(builder_builds[bn][i]) }}
{% for b in builder_builds %}
{{ grid.build_td(b[i]) }}
{% endfor %}
</tr>
{% endfor %}
Expand Down

0 comments on commit 89a5852

Please sign in to comment.