{% extends "admin-base.html" %} {% from "ui.html" import when with context %} {% macro state_label(state) -%} {% if state == "ok" %}{{ _("OK") }}{% elif state == "warn" %}{{ _("To check") }}{% else %}{{ _("Problem") }}{% endif %} {%- endmacro %} {% block section %}

{{ _("State of the instance") }}

{{ state_label(report.state) }}
{% for check in report.checks %}
{{ _(check.title) }}{{ _(check.message.template, **check.message.params) }}{% if check.at %} {{ when(check.at) }}{% endif %}
{{ state_label(check.state) }}
{% endfor %}

{{ _("Prometheus metrics: on, at /metrics.") if metrics_on else _("Prometheus metrics: off (METRICS_TOKEN).") }}

{{ _("Spaces") }} {{ report.spaces|length }}

{% if report.spaces %}
{% for row in report.spaces %} {% set space = row.space %} {% endfor %}
{{ _("Space") }}{{ _("Git sync") }}{{ _("Last tidy-up") }}{{ _("Inbox") }}
{{ space.address }} {% if not space.repo_url %}{{ _("No repository") }} {% elif space.sync_status == "conflict" %}{{ _("Conflict") }} {% elif space.sync_status == "error" %}{{ _("Failed") }} {% elif space.synced_at %}{{ when(space.synced_at) }} {% else %}{{ _("Not synchronized yet") }}{% endif %} {% if row.last_tidy is none %}{{ _("None yet") }} {% else %}{% if row.last_tidy.status == "failed" %}{{ _("Failed") }} {% endif %}{{ when(row.last_tidy.finished_at) }}{% endif %} {{ row.waiting if row.waiting is not none else "—" }}
{% else %}

{{ _("No space yet.") }}

{% endif %}

{{ _("System alerts") }} {{ report.alerts|length }}

{{ _("The last 30 days, at most 50. Organization administrators get them by email.") }}

{% if report.alerts %}
{% for alert in report.alerts %}
{{ _(alert.title) }} {{ when(alert.at) }}{% if alert.space %} · {{ alert.space.address }}{% elif alert.organization %} · {{ alert.organization.name }}{% endif %} {% if alert.error %}{{ alert.error }}{% endif %}
{% endfor %}
{% else %}

{{ _("No alert.") }}

{% endif %}
{% endblock %}