{% load i18n ui help %}{% comment %} The gridded run's jobs (thresholds, then indices): progress while they run, polled by htmx (outerHTML swap) as the job page's fragment is; then each job's files to download. When the last job finishes the server asks htmx to reload the page, so the map appears. Parameters: run, rows (kind, job, stage_label, elapsed, remaining, worker_missing, files), active, delay, all_done. {% endcomment %}
{% if job.total %}{% blocktranslate with step=job.step total=job.total %}Step {{ step }} of {{ total }}.{% endblocktranslate %}{% endif %} {% if row.elapsed %}{% blocktranslate with elapsed=row.elapsed %}Time so far: {{ elapsed }}.{% endblocktranslate %}{% endif %} {% if row.remaining %}{% blocktranslate with remaining=row.remaining %}About {{ remaining }} left.{% endblocktranslate %}{% endif %} {% if job.status == "queued" and row.kind == "indices" and run.thresholds_job and not run.thresholds_job.is_finished %}{% translate "The indices start when the thresholds file is finished." %}{% endif %}
{% translate "Cancelling…" %}
{% endif %} {% if row.worker_missing %} {% translate "No calculation worker is running, so this 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 == "failed" %}{{ job.error }}
{% blocktranslate count counter=row.files|length with elapsed=row.elapsed trimmed %}Finished in {{ elapsed }}: {{ counter }} file.{% plural %}Finished in {{ elapsed }}: {{ counter }} files.{% endblocktranslate %}{% if job.result.copied_to %} {% blocktranslate with folder=job.result.copied_to %}Also copied to {{ folder }}.{% endblocktranslate %}{% endif %}
{% if row.kind == "indices" %}{% help_topic "gridded.output" %}{% endif %}| {% translate "File" %} | {% translate "Index" %} | {% translate "Frequency" %} | {% translate "Size" %} |
|---|---|---|---|
| {{ f.name }} | {{ f.index }} | {% if f.freq == "ANN" %}{% translate "annual" %}{% elif f.freq == "MON" %}{% translate "monthly" %}{% elif f.freq == "DAY" %}{% translate "daily" %}{% endif %} | {{ f.size|filesizeformat }} |
{% translate "Download all (zip)" as zip_label %}{% url 'gridded:download_all' run.pk as zip_url %}{% include "components/button.html" with label=zip_label href=zip_url icon="download" size="lg" %}
{% for row in rows|slice:":1" %}{% icon "clock" %}{% blocktranslate with date=row.job.expires_at|date:"j F Y, H:i e" %}The results are deleted on {{ date }}.{% endblocktranslate %}
{% endfor %} {% endif %}