Files
komp_ac/web/templates/pages/admin/ecb/ecb.html
2026-08-14 20:35:37 +02:00

81 lines
3.3 KiB
HTML

{# GET /admin/ecb — crate::pages::admin::ecb::ui::EcbPage #}
{% extends "ui/base.html" %}
{% block title %}{{ nav.tr("ecb-title") }}{% endblock %}
{% block content %}
<main>
<section class="heading">
<div>
<p class="eyebrow">{{ nav.tr("ecb-title") }}</p>
<h1>{{ nav.tr("ecb-heading") }}</h1>
<p>{{ nav.tr("ecb-description") }}</p>
</div>
<div class="actions">
<a href="/admin">{{ nav.tr("ui-back-to-admin-panel") }}</a>
</div>
</section>
{% include "pages/admin/ecb/status.html" %}
<section class="panel">
<h2>
{{ nav.tr("ecb-import-attempts") }} <span class="count">{{ page.batches.len() }}</span>
{%- if page.failure_count() > 0 %}<span class="tag tag-bad">{{ page.failed_count_label() }}</span>{% endif -%}
</h2>
{% if page.batches.is_empty() %}
<p class="hint">{{ nav.tr("ecb-no-attempts-hint") }}</p>
{% else %}
<div class="table-scroll">
<table class="builder-table">
<thead>
<tr>
<th class="mark">#</th><th>{{ nav.tr("ecb-th-result") }}</th><th>{{ nav.tr("ecb-th-started") }}</th><th>{{ nav.tr("ecb-th-finished") }}</th>
<th>{{ nav.tr("ecb-th-took") }}</th><th>{{ nav.tr("ecb-th-window") }}</th><th class="numeric">{{ nav.tr("ecb-th-observations") }}</th>
<th>{{ nav.tr("ecb-th-verified-through") }}</th>
</tr>
</thead>
<tbody>
{% for batch in page.batches %}
<tr{% if batch.failed() %} class="attempt-failed"{% endif %}>
<td class="mark">{{ batch.batch_id }}</td>
<td>
{%- if batch.succeeded() %}<span class="tag tag-ok">{{ nav.tr("ecb-batch-succeeded") }}</span>
{%- else if batch.running() %}<span class="tag">{{ nav.tr("ecb-batch-running") }}</span>
{%- else %}<span class="tag tag-bad">{{ nav.tr("ecb-batch-failed") }}</span>{% endif -%}
</td>
<td class="moment">{{ batch.started() }}</td>
<td class="moment">
{%- if let Some(finished) = batch.finished() %}{{ finished }}
{%- else %}<span class="hint">{{ nav.tr("ecb-still-running") }}</span>{% endif -%}
</td>
<td class="numeric">
{%- if let Some(took) = batch.took(nav.locale) %}{{ took }}
{%- else %}<span class="hint"></span>{% endif -%}
</td>
<td>
{{ batch.window() }}
<div class="hint endpoint" title="{{ batch.endpoint }}"><code>{{ batch.endpoint }}</code></div>
</td>
<td class="numeric">{{ batch.observations(nav.locale) }}</td>
<td class="moment">
{%- if let Some(date) = batch.verified_through_date %}{{ date }}
{%- else %}<span class="hint"></span>{% endif -%}
</td>
</tr>
{% if let Some(message) = batch.error_message %}
<tr class="attempt-error">
<td class="mark"></td>
<td colspan="7">{{ message }}</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
<p class="hint">{{ nav.tr("ecb-audit-hint") }}</p>
{% endif %}
</section>
</main>
{% endblock %}