{% extends 'base.html' %}
{% block content %}
   
    <div class="row">
        <div class="col-md-6 offset-md-3">
            <div class="mb-0 d-flex align-items-center justify-content-between">
                <h3 class="my-0 d-inline-block text-gray-900">Credential Store</h3><a href="#" id="btn-renew">Renew All</a>
            </div>
            <hr class="my-2 mb-3">
            <table class="table table-striped table-bordered text-center table-responsive-sm">
                <thead>
                <tr>
                    <th class="align-middle" scope="col">Location</th>
                    <th class="align-middle" scope="col">Time Left</th>
                    <th class="align-middle" scope="col">Expiry Time</th>
                    <th class="align-middle" scope="col">Valid</th>
                    <th class="align-middle" scope="col">Exists</th>
                </tr>
                </thead>
                <tbody>
                {% for c in credential_info_list %}
                    <tr>
                        <th class="align-middle" scope="row">{{ c['location'] }}</th>
                        <td class="align-middle">{{ c['time_left'] }}</td>
                        <td class="align-middle text-break">{{ c['expiry_time'] }}</td>
                        <td class="align-middle text-break">{{ c['is_valid'] }}</td>
                        <td class="align-middle">{{ c['exists'] }}</td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
   
{% endblock content %}
{% block footer %}
    <script defer src="{{ url_for('static', filename='js/credentials.js') }}"></script>
{% endblock footer %}