{# PostGIS health card — only rendered when the extension is installed. #} {% from "components/feedback.html" import badge %}
Spatial PostGIS {{ postgis }} {{ columns | length }} geometry column{{ '' if columns | length == 1 else 's' }}
{% if findings %}{{ badge(findings | length ~ " finding" ~ ('' if findings | length == 1 else 's'), "warning") }}{% else %}{{ badge("healthy", "success") }}{% endif %}
{% if findings %}
{% for f in findings %}
{{ f.message }}
{{ f.fix }}
{% endfor %}
{% endif %} {% for c in columns %} {% endfor %}
TableColumnTypeSRIDRowsIndexInvalidExtent
{{ c.table }} {{ c.column }} {{ c.type }} {% if c.srid %}{{ c.srid }}{% else %}{{ badge("0", "warning") }}{% endif %} {{ "{:,}".format(c.approx_rows) }} {% if c.has_index %}{{ badge("GIST", "success") }}{% else %}{{ badge("none", "warning" if c.approx_rows >= 1000 else "info") }}{% endif %} {% if c.invalid is none %}—{% elif c.invalid %}{{ c.invalid }}{% else %}0{% endif %} {{ c.extent or '—' }}