PageRenderTime 122ms CodeModel.GetById 81ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 0ms

/kai/templates/buildbot/index.mako

https://bitbucket.org/bbangert/kai/
Mako | 95 lines | 90 code | 5 blank | 0 comment | 9 complexity | 0898316b36795c2882115c80f1ae1a64 MD5 | raw file
 1<div class="yui-b content">
 2    <h1>${_('Buildbot Status')}</h1>
 3    <p>${_("""Pylons source code is <strong>automatically built and tested</strong> via
 4        <a href="http://buildbot.net/trac">Buildbot</a> to ensure consistent
 5        release quality and track bugs that may occur during development (also
 6        known as <strong><a href="http://en.wikipedia.org/wiki/Continuous_Integration">
 7            Continuous integration</a></strong>). The
 8        latest builds are posted here automatically as they're
 9        completed. For those tracking the latest development tip, this can serve
10        as a useful reference when decided whether to update.""") | n}</p>
11    
12    <p>${_("""In <a href="http://www.selenic.com/mercurial/">Mercurial</a>, the revision
13        control system (RCS) used by Pylons, the latest revision is called the
14        tip.""") | n}</p>
15    
16    <h2>${_('Latest Release  (%s)' % app_globals.current_version)}</h2>
17    ${build_table(c.releases)}
18    <div class="loadmore viewtoggle release"><a href="#">${_('Older release builds')}</a></div>
19    <div class="older release" style="display: none;">
20        ${build_table(c.releases, start=1, limit=None, include_header=None)}
21    </div>
22    
23    <div class="clearfix">&nbsp;</div>
24    
25    <h2>${_('Development Tip')}</h2>
26    ${build_table(c.dev)}
27    <div class="loadmore viewtoggle dev"><a href="#">${_('Older tip builds')}</a></div>
28    <div class="older dev" style="display: none;">
29        ${build_table(c.dev, start=1, limit=None, include_header=None)}
30    </div>
31    
32    <br /><br /><br />
33    <div id="buildinfo" style="display:none; cursor: default">
34        <h1>${_('Loading...')}</h1>
35    </div>
36</div>
37<%def name="build_table(builds, start=0, limit=1, include_header=True)">
38<table class="buildbot">\
39    % if include_header:
40    <thead>
41        <tr>
42            <th colspan="${len(builds)}">${_('Build Name')}</th>
43        </tr>
44        <tr>
45            % for build in sorted(builds.keys()):
46            <th>${build}
47            % endfor
48    </thead>
49    % endif
50    <tbody>
51        <%
52            here = start
53            limit = limit
54            stop = 100
55            for build in sorted(builds.keys()):
56                newmin = len(builds[build]) - 1
57                if newmin < stop:
58                    stop = newmin
59        %>
60        % while True:
61        <tr class="run">
62            % for build in sorted(builds.keys()):
63            <% 
64                time = builds[build][here]['end']
65            %>
66            <td>${format.datetime(time, "medium")}</td>
67            % endfor
68        </tr>
69        <tr>
70            % for build in sorted(builds.keys()):
71            <% item = builds[build][here] %>
72            <td class="result">
73            <div class="details"><a href="#" class="${'%s__%s' % (item['name'], item['version'])}">&nbsp;</a></div>
74            % if not item['reasons']:
75            <span class="${item['results']}">${item['results']}</span>
76            % endif
77            % for reason in item['reasons']:
78                <span class="failure">${reason[0]}</span><br />
79            % endfor
80            </td>
81            % endfor
82        </tr>
83        <%
84            here += 1
85            if limit and here == limit:
86                break
87            elif here > stop:
88                break
89        %>
90        % endwhile
91    </tbody>
92</table>
93</%def>
94<%def name="title()">${parent.title()} - ${_('Buildbot Status')}</%def>
95<%inherit file="../layout.mako" />