blob: 13d74347eab1cc0b08472d38009389d2241b56da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<div id="build_status">
<h1>Build Status (CI)</h1>
<small>
Last updated on
<%=Time.at(update_timestamp.to_i).strftime('%Y-%m-%d')%>
using a portage snapshot dated
<%=Time.at(portage_timestamp.to_i).strftime('%Y-%m-%d')%>
</small>
</div>
<form class="pull-right">
<input type="checkbox" onclick="$('td:contains(\'+amd64\')').parent().toggle();" checked> amd64
<input type="checkbox" onclick="$('td:contains(\'+~amd64\')').parent().toggle();" checked> ~amd64
</form>
<table id="sortable" class="table table-bordered table-condensed">
<thead>
<tr>
<th class="width-52">Package</th>
<th class="width-14">Date</th>
<th class="width-17">Result</th>
<th class="width-17">History</th>
</tr>
</thead>
<%builds.each do |build|%>
<%package = Package.where(identifier: build[:package_id]).first%>
<%next if package.nil?%>
<%result = 'success' if build[:result] == 'succeeded'%>
<%result = 'info' if build[:result] == 'timed out'%>
<%result = 'danger' if build[:result] == 'failed'%>
<tr>
<td class="width-52">
<%=build[:package_id]%>
</td>
<td class="width-14">
<%=Time.at(build[:time].to_i).strftime('%Y-%m-%d')%>
</td>
<td class="width-17 <%=result%>">
<a href="/build_logs/<%=build[:package_id]%>/<%=build[:time]%>"><%=build[:result].camelcase%></a>
</td>
<td class="width-17">
<a href="/build_history/<%=build[:package_id]%>"><%=Build.where(package_id: build[:package_id]).count%> Build(s)</a>
</td>
<td style="display:none;">
+<%=package[:amd64_keyword]%>
</td>
</tr>
<%end%>
</table>
|