{# ── Postgres pools ────────────────────────────────────────── #}
{% if postgres_pools %}
{% for p in postgres_pools %}
{{ p.dsn }}
{{ p.size_active }}/{{ p.size_used }} active
{% endfor %}
{% else %}
No active connection pools.
{% endif %}
{% if postgres_error %}
Error: {{ postgres_error }}
{% endif %}
{# ── SSH tunnels ───────────────────────────────────────────── #}
{% if ssh_tunnels %}
{% for s in ssh_tunnels %}
{{ s.ssh_host }}
{{ s.forwards }} forward{% if s.forwards != 1 %}s{% endif %},
{{ s.consumers }} consumer{% if s.consumers != 1 %}s{% endif %}
{% endfor %}
{% else %}
No active SSH tunnels.
{% endif %}
{% if ssh_error %}
Error: {{ ssh_error }}
{% endif %}
{# ── AI provider ──────────────────────────────────────────── #}
{% if ai_provider.configured %}
{% if ai_provider.ok %}
OK
Probe took {{ ai_provider.elapsed_ms }}ms
{% else %}
FAIL
{{ ai_provider.error or 'health check failed' }}
{% endif %}
{% else %}
—
Not configured
{% endif %}
{# ── Scheduler ────────────────────────────────────────────── #}
{% if scheduler.running %}RUNNING{% else %}STOPPED{% endif %}
{{ scheduler.jobs }} job{% if scheduler.jobs != 1 %}s{% endif %} registered
{% if scheduler.last_failed %}
Last failed: {{ scheduler.last_failed.job_id }} — {{ scheduler.last_failed.error }}
{% endif %}
{# ── Plugins ──────────────────────────────────────────────── #}
{% if plugins %}
{% for p in plugins %}
{{ p.name }} v{{ p.version }}
{% if p.db_size %}
{{ "%.1f"|format(p.db_size / 1024) }} KB
{% else %}
—
{% endif %}
{% endfor %}
{% else %}
No plugins installed.
{% endif %}