{% extends "report_tables.html" %}
{% block content %}
    <div class="alert alert-primary" role="alert">
        <h3>{{ title }}</h3>
        <table id="report-table"
               class="table table-striped table-hover table-bordered bg-light"
               data-toggle="table"
               data-sticky-header="true"
               data-sticky-header-offset-y="65"
               data-sortable="true">
            <thead>
                <tr class="bg-primary text-white">
                    <th class="text-center">Dataset</th>
                    <th class="text-center">Score</th>
                    <th class="text-center">Hyperparameters</th>
                    <th class="text-center">File</th>
                </tr>
            </thead>
            <tbody>
                {% for dataset, info in data.items() %}
                    <tr>
                        <td class="text-left">
                            <a href="{{ url_for("results.dataset_report", dataset=dataset) }}">{{ dataset }}</a>
                        </td>
                        <td class="text-end">{{ '%9.7f' % info[0] }}</td>
                        <td class="text-center">{{ info[1] }}</td>
                        <td>
                            {% set url = url_for(request.endpoint, **request.view_args)|urlencode %}
                            <a href="{{ url_for('results.report', file_name = info[2]) }}?url={{ url }}&url_name=Best Results Report">{{ info[2] }}</a>
                        </td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
{% endblock content %}
{% block jscript %}
    {{ super() }}
    <script src="{{ url_for('static', filename="js/report.js") }}"></script>
{% endblock jscript %}
