debian-koji/www/kojiweb/templates/buildsbystatus.html.j2
2025-05-07 14:07:04 +02:00

63 lines
2.1 KiB
Django/Jinja

#macro printOption(value, label=None)
#if not label
#set label = value
#endif
<option value="{{ value }}"{{ ' selected' if value == days else '' }}>{{ label }}</option>
#endmacro
#set numTotal = numSucceeded + numFailed + numCanceled
#include "header.html.j2"
<h4>Succeeded/Failed/Canceled Builds{{ ' in the last %i days' % days if days != -1 else '' }}</h4>
<table class="data-list">
<tr style="text-align: left">
<td colspan="3">
<form action="">
Show last
<select onchange="javascript: window.location = 'buildsbystatus?days=' + this.value;">
{{ printOption(1) }}
{{ printOption(3) }}
{{ printOption(5) }}
{{ printOption(7) }}
{{ printOption(14) }}
{{ printOption(30) }}
{{ printOption(60) }}
{{ printOption(90) }}
{{ printOption(120) }}
{{ printOption(180) }}
{{ printOption(365) }}
{{ printOption(-1, 'all') }}
</select> days
</form>
</td>
</tr>
<tr class="list-header">
<th>Type</th>
<th>Builds</th>
<th>&nbsp;</th>
</tr>
<tr class="row-odd taskclosed">
<td>Succeeded</td>
<td width="{{ graphWidth + 5 }}"><img src="{{ util.themePath('images/1px.gif') }}" width="{{ increment * numSucceeded }}" height="15" class="graphrow" alt="graph row"/></td>
<td>{{ numSucceeded }}</td>
</tr>
<tr class="row-even taskfailed">
<td>Failed</td>
<td width="{{ graphWidth + 5 }}"><img src="{{ util.themePath('images/1px.gif') }}" width="{{ increment * numFailed }}" height="15" class="graphrow" alt="graph row"/></td>
<td>{{ numFailed }}</td>
</tr>
<tr class="row-odd taskcanceled">
<td>Canceled</td>
<td width="{{ graphWidth + 5 }}"><img src="{{ util.themePath('images/1px.gif') }}" width="{{ increment * numCanceled }}" height="15" class="graphrow" alt="graph row"/></td>
<td>{{ numCanceled }}</td>
</tr>
<tr class="row-even">
<td>Total</td>
<td></td>
<td>{{ numTotal }}</td>
</tr>
</table>
#include "footer.html.j2"