{% if not reachable %} {% include "partials/unreachable.html" %} {% else %} {% if message %}
{{ t('status.prompt') }} {{ message }}
{% endif %}

{{ t('instances.sources') }}

{% if not sources %}

{{ t('instances.none') }}

{% endif %} {% for s in sources %}

{{ s.name }} {{ s.type }} {{ s.state }} {% if s.health %}{{ s.health }}{% endif %} {% if s.stopped_by_operator %}{{ t('instances.by_operator') }}{% endif %}

{% for action in ('start', 'stop', 'restart') %} {% endfor %}
{% if s.reason %}
{{ t('instances.health') }}
{{ s.reason }}{% if s.more %}{{ t('overview.more', count=s.more) }}{% endif %}{% if s.since %} · {{ s.since | when }}{% endif %}
{% endif %}
{{ t('instances.resources') }}
{{ s.resources | join(', ') or t('common.none') }}
{{ t('instances.points') }}
{{ s.points.get('active', 0) }} active · {{ s.points.get('unsupported', 0) }} unsupported · {{ s.points.get('rejected', 0) }} rejected · {{ s.points.get('pending', 0) }} pending
{{ t('instances.newest') }}
{% if s.last_observation %}{{ s.last_observation | when }}{% else %}{{ t('common.none') }}{% endif %}{% if s.points.get('stale') %} · {{ s.points.get('stale') }} stale{% endif %}
{{ t('instances.restarts') }}
{{ s.restart_count }}{% if s.next_retry %} · {{ t('instances.next_retry') }} {{ s.next_retry | when }}{% endif %}
{% if s.last_error %}
{{ t('instances.last_error') }}
{{ s.last_error }}
{% endif %}
{% if s.devices %}
{% for d in s.devices %} {% endfor %}
{{ t('devices.device') }}{{ t('devices.reachable') }}{{ t('devices.last_success') }}{{ t('devices.errors') }}{{ t('devices.skipped') }}{{ t('devices.last_error') }}
{{ d.device }} {% if d.reachable %}{{ t('common.yes') }}{% elif d.reachable is none %}{% else %}{{ t('common.no') }}{% endif %} {{ d.last_success | when }} {{ d.error_count }} {{ d.skipped_rounds }} {{ d.last_error or '' }}
{% endif %}
{% endfor %}

{{ t('instances.destinations') }}

{% if not destinations %}

{{ t('instances.none') }}

{% endif %} {% for d in destinations %}

{{ d.name }} {{ d.type }} {{ d.state }} {% if d.health %}{{ d.health }}{% endif %}

{% for action in ('start', 'stop', 'restart') %} {% endfor %}
{% if d.reason %}
{{ t('instances.health') }}
{{ d.reason }}{% if d.more %}{{ t('overview.more', count=d.more) }}{% endif %}{% if d.since %} · {{ d.since | when }}{% endif %}
{% endif %}
{{ t('instances.metadata') }}
{{ t('common.yes') if d.stores_metadata else t('common.no') }}
{{ t('instances.model') }}
{% if d.stores_model %}{{ t('common.yes') }}{% if d.model_version is not none %} · {{ t('instances.model_version') }} {{ d.model_version }}{% endif %}{% else %}{{ t('common.no') }}{% endif %}
{{ t('instances.written') }}
{{ d.written }}{% if d.last_write %} · {{ d.last_write | when }}{% endif %}
{{ t('instances.spool') }}
{{ d.spool.observations }} observations · {{ d.spool.bytes }} bytes{% if d.spool.oldest_age_seconds %} · oldest {{ d.spool.oldest_age_seconds | int }} s{% endif %}{% if d.spool.dropped %} · {{ d.spool.dropped }} dropped{% endif %}
{% if d.last_error %}
{{ t('instances.last_error') }}
{{ d.last_error }}
{% endif %}
{% endfor %} {% endif %}