{% extends "django_prometric/components/card.html" %} {% load i18n prometric_extras %} {% block body %} {% if stats %}
{% translate "Database size" %}
{{ stats.size_bytes|size }}
{% translate "Tables" %}
{{ stats.table_count|num }}
{% blocktranslate with rows=stats.row_estimate|num %}~{{ rows }} live rows{% endblocktranslate %}
{% translate "Indexes" %}
{{ stats.index_count|num }}
{% translate "Connections" %}
{{ stats.used_connections|num }}{% if stats.max_connections %} / {{ stats.max_connections|num }}{% endif %}
{% if stats.cache_hit_ratio is not None %}
{% translate "Cache hit ratio" %}
{{ stats.cache_hit_ratio.value|pct }}
{% include "django_prometric/components/_cumulative.html" with since=stats.cache_hit_ratio.since %}
{% endif %} {% if stats.commits is not None %}
{% translate "Commits" %}
{{ stats.commits.value|num }}
{% blocktranslate with rolled=stats.rollbacks.value|num %}{{ rolled }} rolled back{% endblocktranslate %} {% include "django_prometric/components/_cumulative.html" with since=stats.commits.since %}
{% endif %} {% if stats.deadlocks is not None %}
{% translate "Deadlocks" %}
{{ stats.deadlocks.value|num }}
{% include "django_prometric/components/_cumulative.html" with since=stats.deadlocks.since %}
{% endif %} {% if stats.temp_bytes is not None %}
{% translate "Temp files" %}
{{ stats.temp_bytes.value|size }}
{% include "django_prometric/components/_cumulative.html" with since=stats.temp_bytes.since %}
{% endif %}

{% translate "Sizes and counts are current; badged figures are lifetime counters since the last statistics reset." %}

{% else %}

{% translate "No database statistics are available." %}

{% endif %} {% endblock %}