{% load debusine %}
{% if rows %}
    <table class="table">
        <thead>
            <tr>
                <th>Test name</th>
                <th>Original result for {{ summary.original_source_version }}</th>
                <th>New result for {{ summary.new_source_version }}</th>
                <th>Conclusion</th>
            </tr>
        </thead>
        <tbody>
            {% for row in rows %}
                <tr>
                    <td>{{ row.name }}</td>
                    <td>
                        {% if row.orig %}
                            <a href="{{ row.orig.get_absolute_url }}">
                                {% include "web/_work_request-result.html" with result=row.orig.created_by_work_request.result only %}
                            </a>
                        {% else %}
                            -
                        {% endif %}
                    </td>
                    <td>
                        {% if row.new %}
                            <a href="{{ row.new.get_absolute_url }}">
                                {% include "web/_work_request-result.html" with result=row.new.created_by_work_request.result only %}
                            </a>
                        {% else %}
                            -
                        {% endif %}
                    </td>
                    <td>
                        <span style="display: inline-block; width: 1em">
                            {% if row.analysis.status == "no-result" %}
                                ?
                            {% elif row.analysis.status == "error" %}
                                !
                            {% elif row.analysis.status == "improvement" %}
                                ➚
                            {% elif row.analysis.status == "stable" %}
                                ⇄
                            {% elif row.analysis.status == "regression" %}
                                ➘
                            {% else %}
                                —
                            {% endif %}
                        </span>
                        {{ row.analysis.status }}
                    </td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
{% else %}
    No regression analysis results
{% endif %}
{% for w in warnings %}<div class="alert alert-warning" role="alert">{{ w }}</div>{% endfor %}
