{% extends "base.html" %}

{% load bootstrap3 %}

{% block page_title %}Report - {{ report }} {% endblock %}

{% block breadcrumbs %} {{ block.super }} <li><a href="{% url 'reports:report_list' %}">Reports</a></li><li class="active">{{ report }}</li>{% endblock %}

{% block content_title %} Report - {{ report }}{% endblock %}

{% block content %}

<div class="well well-sm">
  <table class="table table-striped table-bordered table-hover table-condensed table-responsive">
    <tr><th>Host</th><td> {{ report.host }} </td></tr>
    <tr><th>Reporting IP Address</th><td> {{ report.report_ip }} </td></tr>
    <tr><th>Domain</th><td> {{ report.domain }} </td></tr>
    <tr><th>Running Kernel</th><td> {{ report.kernel }} </td></tr>
    <tr><th>Reboot Required?</th><td> {{ report.reboot }} </td></tr>
    <tr><th>OS</th><td> {{ report.os }} </td></tr>
    <tr><th>Arch</th><td> {{ report.arch }} </td></tr>
    <tr><th>Tags</th><td> {{ report.tags }} </td></tr>
    <tr><th>Client Protocol</th><td> {{ report.protocol }} </td></tr>
    <tr><th>User Agent</th><td> {{ report.useragent }} </td></tr>
    <tr><th>Has Been Processed?</th><td> {{ report.processed }} </td></tr>
  </table>

  <div class="panel panel-danger">
    {% if user.is_authenticated and perms.is_admin %}
      <div class="panel-heading">
        Are you sure you want to delete this Report?
      </div>
      <div class="panel-body">
        <form action={{ request.path }} method="post">
          {% csrf_token %}
          <button name="delete" type="submit" class="btn btn-primary btn-sm">{% bootstrap_icon "trash" %} Delete</button>
          <button name="cancel" type="submit" class="btn btn-primary btn-sm">{% bootstrap_icon "stop" %} Cancel</button>
        </form>
      </div>
    {% else %}
      <div class="panel-heading">
        You do not have permission to delete this Report.
      </div>
        <div class="panel-body">
        <a class="btn btn-primary btn-sm" href="{{ report.get_absolute_url }}">{% bootstrap_icon "arrow-left" %} Back</a>
      </div>
    {% endif %}
  </div>
</div>

{% endblock %}
