{# The health card — crate::pages::admin::ecb::ui::StatusFragment, and what ecb.html embeds on first load. It carries its own poll trigger rather than the page carrying it, so the trigger travels with each swap: while a batch is running the card asks for itself every few seconds, and the card that comes back after the batch finishes has no trigger, which is what stops the polling. #}

{{ page.headline() }} {% if page.import_running %}import running{% endif %}

{{ page.explanation() }}

Verified through
{% if let Some(date) = page.verified_through_date %}{{ date }}{% else %}never{% endif %}
Should reach
{{ page.latest_verifiable_date }}
Next import
{{ page.next_import_at }}
Currencies on that day
{%- if page.covered_currencies.is_empty() %}none {%- else %}{{ page.covered_currencies.len() }}{% endif -%}
{% if !page.covered_currencies.is_empty() %}
{% for currency in page.covered_currencies %}{{ currency }}{% endfor %}
{% endif %} {% if let Some(failure) = page.last_failure() %}

Most recent failure — batch {{ failure.batch_id }}, started {{ failure.started_at }}: {% if let Some(message) = failure.error_message %}{{ message }}{% else %}no reason was recorded.{% endif %}

{% endif %}