Skip to content
Browse files

Improve display by expliciting build and test failures.

  • Loading branch information...
1 parent 12b1e26 commit 78cbe4a371e7985c13e96f606a210e2aaf7e1b07 @Flameeyes Flameeyes committed Jun 18, 2012
Showing with 16 additions and 9 deletions.
  1. +8 −6 display.rb
  2. +8 −3 views/index.erb
View
14 display.rb
@@ -33,12 +33,14 @@
order(:date, :desc).
limit(100).
select(:all).map do |data|
- { :name => data.name,
- :host => (data.attributes["host"][0] rescue ""),
- :public_url => (data.attributes["public_url"][0] rescue ""),
- :date => (data.attributes["date"][0] rescue ""),
- :pkg => (data.attributes["pkg"][0] rescue ""),
- :matches => (data.attributes["matches"][0] rescue "")
+ { :name => data.name,
+ :host => (data.attributes["host"][0] rescue ""),
+ :public_url => (data.attributes["public_url"][0] rescue ""),
+ :date => (data.attributes["date"][0] rescue ""),
+ :pkg => (data.attributes["pkg"][0] rescue ""),
+ :matches => (data.attributes["matches"][0] rescue ""),
+ :pkg_failed => (data.attributes["pkg_failed"][0] == "true" rescue false),
+ :test_failed => (data.attributes["test_failed"][0] == "true" rescue false),
}
end
View
11 views/index.erb
@@ -6,8 +6,9 @@
<body>
<table>
<tr>
- <th>filename</th>
- <th>package</th>
+ <th>hostname</th>
+ <th>package name</th>
+ <th>date</th>
<th>matches</th>
</tr>
@@ -17,7 +18,11 @@
<td><a href="<%= item[:public_url] %>"><%= item[:pkg] %></a></td>
<td><%= item[:date] %></td>
<td><%= item[:pkg] %></td>
- <td><%= item[:matches] %></td>
+ <td>
+ <%= item[:matches] %>
+ <% if item[:test_failed] %>[TF]<% end %>
+ <% if item[:pkg_failed] %>[BF]<% end %>
+ </td>
</tr>
<% end %>
</table>

0 comments on commit 78cbe4a

Please sign in to comment.
Something went wrong with that request. Please try again.