{% load i18n ui %}{% comment %} The job's progress, polled by htmx (outerHTML swap) while the job is queued or running; polling stops once it has finished. Built from the progress, alert and disclosure components' classes. {% endcomment %}
{% if job.total %}{% blocktranslate with step=job.step total=job.total percent=job.percent %}Step {{ step }} of {{ total }} ({{ percent }}%){% endblocktranslate %}{% else %}{{ job.get_status_display }}{% 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 job 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 %}
{% blocktranslate with size=zip_size|filesizeformat asvar zip_label %}Download all results (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 %} {% if files %}{{ job.error }}
{% icon "clock" %}{% blocktranslate with date=job.expires_at|date:"j F Y, H:i e" %}The results and uploaded files are deleted on {{ date }}.{% endblocktranslate %}
{% endif %}