{% load common report_alert %}
<table class="table table-striped table-bordered table-hover table-condensed table-responsive">
  <thead>
    <tr>
      <th class="col-sm-3">Hostname</th>
      <th class="col-sm-1" colspan="2">Updates</th>
      <th class="col-sm-2">Running Kernel</th>
      <th class="col-sm-3">OS</th>
      <th class="col-sm-2">Last Report</th>
      <th class="col-sm-1">Reboot Status</th>
    </tr>
  </thead>
  <tbody>
  {% for host in object_list %}
    <tr>
      <td><a href="{{ host.get_absolute_url }}">{{ host }}</a></td>
      <td class="centered" style="color:red">{% with count=host.get_num_security_updates %}{% if count != 0 %}{{ count }}{% else %}&nbsp;{% endif %}{% endwith %}</td>
      <td class="centered" style="color:orange">{% with count=host.get_num_bugfix_updates %}{% if count != 0 %}{{ count }}{% else %}&nbsp;{% endif %}{% endwith %}</td>
      <td>{{ host.kernel }}</td>
      <td><a href="{{ host.os.get_absolute_url }}">{{ host.os }}</a></td>
      <td>{{ host.lastreport }}{% report_alert host.lastreport %}</td>
      <td class="centered">{% no_yes_img host.reboot_required %}</td>
    </tr>
  {% endfor %}
  </tbody>
</table>
