{% block content %}
<h3>suvi log with {{ log|length }} entries 
    <a href="{{url_for('app_log_json')}}"><img src="/static/img/code.png" title="json" /></a>
    <a href="{{url_for('app_log_txt')}}"><img src="/static/img/text.png" title="txt" /></a>
</h3>
<i>Auto-reloads every second.</i>
<table class="table table-striped table-sm mt-5">
    <thead>
        <tr>
            <th style="width: 200px">Timestamp</th>
            <th style="width: 150px">User</th>
            <th>Output</th>
        </tr>
    </thead>
    <tbody>
        {% for item in log|reverse %}
        {% if item.2 == 'error' %}
        <tr class="table-warning">
        {% else %}
        <tr>
        {% endif %}
            <td><code>{{ item.0 }}</code></td>
            <td><code>{{ item.1 }}</code></td>
            <td><code>{{ item.3 }}</code></td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% endblock %}