{% extends "admin/index.html" %}
{% load i18n static postgres_metrics %}

{% block extrastyle %}
{{ block.super }}
<link rel="stylesheet" type="text/css" href="{% static "postgres_metrics/css/base.css" %}" />
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "postgres_metrics/css/rtl.css" %}{% endblock %}" />{% endif %}
{% endblock %}

{% block sidebar %}
{{ block.super }}

<div id="postgres-metrics">
    <div class="app-postgres_metrics module">
        <table>
            <caption>
                <a href="{% url "admin:index" %}#postgres-metrics" class="section" title="{% trans 'PostgreSQL Metrics' %}">{% trans 'PostgreSQL Metrics' %}</a>
            </caption>
            <tbody>
                {% get_postgres_metrics as postgres_metrics %}
                {% for metric in postgres_metrics %}
                {% url "postgres-metrics:show" name=metric.slug as metric_url %}
                <tr>
                    <th scope="row"><a href="{{ metric_url }}" title="{{ metric.label }}">{{ metric.label }}</a></th>
                    <td><a href="{{ metric_url }}" class="viewlink" title="{{ metric.label }}" aria-label="{% trans 'Show' %} - {{ metric.label }}">{% trans 'Show' %}</a></td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
</div>
{% endblock %}
