{% extends "crashstats_base.html" %}

{% block page_title %}Exploitable crashes{% endblock %}

{% block content %}
<div id="mainbody">
    <div class="page-heading">
        <h2>Exploitable crashes for {{ product }}
        {% if version %}{{ version }}{% endif %}</h2>
        <ul class="options">
        {% for day in possible_days %}
          <li><a href="?days={{ day }}" {% if days == day %}class="selected"{% endif %}>{{ day }} days</a></li>
        {% endfor %}
        </ul>
    </div>

    <div class="panel">
        <div class="body notitle">
            
            {% if current_page == 1 %}
                <strong>&lt;&lt;First</strong>
            {% else %}
                <a href="{{ url('crashstats.exploitable_crashes') }}?page=1">&lt;&lt;First</a>
                <a href="{{ url('crashstats.exploitable_crashes') }}?page={{ current_page-1 }}">&lt;Previous</a>
            {% endif %}
                        
            {% if current_page == pages %}
            <strong>Last&gt;&gt;</strong>
            {% else %}
            <a href="{{ url('crashstats.exploitable_crashes') }}?page={{ current_page+1 }}">Next&gt;</a>
            <a href="{{ url('crashstats.exploitable_crashes') }}?page={{ pages }}">Last&gt;&gt;</a>
            {% endif %}
            
            <table class="builds data-table">
                <thead>
                    <tr>
                        <th>Signature</th>
                        <th>Report date</th>
                        <th>Count HIGH</th>
                        <th>Count MEDIUM</th>
                        <th>Count LOW</th>
                        <th>Count NONE</th>
                    </tr>
                </thead>
                <tbody>
                {% for crash in crashes %}
                    <tr>
                        <td><a href="{{ url('crashstats.report_list') }}?signature={{ crash.signature|urlencode }}">{{ crash.signature }}</a></td>
                        <td>{{ crash.report_date }}</td>
                        <td>{{ crash.high_count }}</td>
                        <td>{{ crash.medium_count }}</td>
                        <td>{{ crash.low_count }}</td>
                        <td>{{ crash.none_count }}</td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</div>
{% endblock %}
