<h4 class="header">
  <%= _("Latest Events") %>
</h4>
<% events = latest_events %>
<% if events.empty? %>
  <p class="ca"><%= _("No interesting reports received in the last week") %></p>
<% else %>
  <table class="table table-striped ellipsis">
    <thead>
      <tr>
        <%= latest_headers %>
      </tr>
    </thead>
    <tbody>
      <% events.each do |report| %>
        <tr>
          <td><%= link_to trunc_with_tooltip(report.host, 14), host_reports_path(report.host) %></td>
          <td><%= report_event_column(report.applied, "label-info") %></td>
          <td><%= report_event_column(report.restarted, "label-info") %></td>
          <td><%= report_event_column(report.failed, "label-danger") %></td>
          <td><%= report_event_column(report.failed_restarts, "label-warning") %></td>
          <td><%= report_event_column(report.skipped, "label-info") %></td>
          <td><%= report_event_column(report.pending, "label-info") %></td>
        </tr>
      <% end %>
    </tbody>
  </table>
<% end %>
