{% extends 'base.html' %}

{% block title %}Eagle Eye - Export Results{% endblock %}

{% block head %}
    <link rel="stylesheet" href="/static/css/export_results.css">
{% endblock %}

{% block content %}
    <div style="margin: 0 auto; width: fit-content;">
        <h2>Exportable Jobs</h2>
        <form id="export-config" action="/export-jobs" method="post" enctype="multipart/form-data">
            <table>
                <tr>
                    <th></th>
                    <th>Job Name</th>
                    <th>Processed Images</th>
                </tr>
                {% for job in jobs %}
                    <tr>
                        <td><input type="checkbox" name="{{ job.job_id }}"/></td>
                        <td><a href="/job-status/{{ job.job_id }}">{{ job.job_name }}</a></td>
                        <td>{{ job.get_processed_results_count() }}</td>
                    </tr>
                {% endfor %}
            </table>

            <input type="submit" form="export-config" value="Submit" style="margin-top: 10px;"/>
        </form>
    </div>
{% endblock %}
