{% extends "base.html" %}

{% block title %}Available Log Files{% endblock %}

{% block header %}
    Log Viewer
    <a href="{{ url_for('instance_matrix') }}" class="btn btn-primary float-end">
        <i class="fas fa-table"></i> View Performance Matrix
    </a>
{% endblock %}

{% block content %}
<div class="card">
    <div class="card-body">
        {% if logs %}
            <ul class="list-group">
                {% for log in logs %}
                <li class="list-group-item d-flex justify-content-between align-items-center">
                    <span class="text-break" style="font-size:90%;">{{ log }}</span>
                    <a href="{{ url_for('view_log', log_path=log) }}" class="btn btn-primary btn-sm">
                        <i class="fas fa-eye"></i> View
                    </a>
                </li>
                {% endfor %}
            </ul>
        {% else %}
            <div class="alert alert-info">
                No log files found.
            </div>
        {% endif %}
    </div>
</div>
{% endblock %}