{% from "macros/local_datetime.html" import local_datetime %} {# show_dismiss=false leaves a finished job without Dismiss (which deletes it), for pages that keep finished runs as history, like Index Photos. #} {% set dismissible = show_dismiss | default(true) %} {# The page the card is shown on, which "Ask Yaffo" attaches. On a page it's that page's path; the card's refresh and Cancel requests pass it back (as `page`), since their own path is /jobs/…. #} {% set help_page = help_page | default(none) or request.path %} {% set status = run_status(job.status, job.error_count) %}
{{ status.label }} {{ _("Started:") }} {{ local_datetime(job.started_at or job.created_at) }}
{% if progress >= 100 and has_results and results_route %} {{ _("Show Results") }} {% endif %} {% if assistant_help | default(false) and (job.status == 'FAILED' or job.error or job.error_count) %} {% endif %} {% if show_cancel and (dismissible or not is_finished) %} {% endif %}
{# Some jobs (e.g. file sync runs) are created without a message. #}
{{ (job.message or '').replace('{totalCount}', total_count|string).replace('{taskCount}', job.task_count|string) }}
{{ (progress / 100) | format_percent(2) }}
{% if job.error_count or job.error %}
{% if job.error_count %} {{ ngettext("%(count)s error", "%(count)s errors", job.error_count, count=job.error_count) }} {% endif %} {% if job.error %}

{{ job.error }}

{% endif %}
{% endif %}