{% load i18n ui %}{% comment %} The batch's progress and, once it has finished, its results: polled by htmx (outerHTML swap) while the job is queued or running, as the job page's fragment is. Parameters: run, job, rows (each station: name, state, step, total, stage_label, percent, error_text, skip_lines, zip, zip_size, report, report_size, folder, error_file), counts, total_stations, stage_label, elapsed, remaining, delay, worker_missing, zip_file, zip_size; opened_url for a station already opened as a single station. {% endcomment %}
{% if stage_label %}{% blocktranslate with stage=stage_label %}{{ stage }}.{% endblocktranslate %}{% endif %} {% if elapsed %}{% blocktranslate %}Time so far: {{ elapsed }}.{% endblocktranslate %}{% endif %} {% if remaining %}{% blocktranslate %}About {{ remaining }} left.{% endblocktranslate %}{% endif %}
{% translate "Cancelling…" %}
{% endif %} {% if worker_missing %} {% translate "No calculation worker is running, so this batch cannot start yet. If you run Climpact yourself, restart it with the climpact-web command." as worker_message %} {% include "components/alert.html" with kind="warning" message=worker_message title="" %} {% endif %} {% if job.can_cancel %} {% endif %} {% endif %} {% if job.status == "succeeded" %}{% blocktranslate %}Finished in {{ elapsed }}.{% endblocktranslate %} {% if counts.failed %}{% blocktranslate count counter=counts.failed trimmed %}{{ counter }} station failed; its error is below.{% plural %}{{ counter }} stations failed; their errors are below.{% endblocktranslate %}{% endif %} {% if counts.skipped %}{% blocktranslate count counter=counts.skipped trimmed %}{{ counter }} station was left out before the run.{% plural %}{{ counter }} stations were left out before the run.{% endblocktranslate %}{% endif %}
{% blocktranslate with size=zip_size|filesizeformat asvar zip_label %}Download all (zip, {{ size }}){% endblocktranslate %}{% url 'jobs:file' job.pk zip_file as zip_url %}{% include "components/button.html" with label=zip_label href=zip_url icon="download" size="lg" %}
{% endif %} {% endif %} {% if job.status == "failed" %}{{ job.error }}
{{ row.error_text }}
{% endif %} {% if row.state == "skipped" %}{% icon "clock" %}{% blocktranslate with date=job.expires_at|date:"j F Y, H:i e" %}The results are deleted on {{ date }}.{% endblocktranslate %}
{% endif %}