{% extends "layout.html" %}
{% set title = "Crawl logs - OD-Database" %}

{% block body %}
    <div class="container-fluid">

        <table class="table table-striped">
            <thead>
            <tr>
                <th>Crawler</th>
                <th>Website</th>
                <th>Status code</th>
                <th>File count</th>
                <th>Start</th>
                <th>End</th>
                <th>Delta</th>
            </tr>
            </thead>

            <tbody>
                {% for task_result in logs %}
                    <tr>
                        <td>{{ task_result.server_name }}</td>
                        <td><a href="/website/{{ task_result.website_id }}/">#{{ task_result.website_id }}</a></td>
                        <td>{{ task_result.status_code }}</td>
                        <td>{{ task_result.file_count }}</td>
                        <td>{{ task_result.start_time | int | datetime_format }}</td>
                        <td>{{ task_result.end_time | int | datetime_format }}</td>
                        <td>{{ ((task_result.end_time - task_result.start_time)) | int }} sec</td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>

    </div>
{% endblock body %}
