{# A compact list of past runs (Jobs): status, progress while running, a summary, the time, and any error text. Import it `with context` (it reads assistant_help). `help_page` is the page path "Ask Yaffo" attaches; `show_label` names what ran, for lists that mix kinds (Index Photos lists index and import runs). Unfinished runs get a Cancel button. #} {% from "macros/local_datetime.html" import local_datetime %} {% from "components/job_details.html" import job_details_block %} {% macro run_history_list(runs, help_page, show_label=false) %} {% endmacro %} {# One row. An unfinished run gets a Cancel button that swaps the row for its cancelled state (jobs.run_cancel); the task stops at its next cancellation check. A file sync row notes its pipeline step and time left, or how many quiet in-sync checks it stands for (run_history.run_views). #} {% macro run_history_row(run, help_page, show_label=false) %}
  • {{ run.status_label }} {% if not run.is_finished %}{{ (run.progress / 100) | format_percent }}{% endif %} {% if show_label and run.label != run.summary %}{{ run.label }}{% endif %} {{ run.summary }} {% if run.stage_note %}{{ run.stage_note }}{% endif %} {% if run.eta_note %}{{ run.eta_note }}{% endif %} {% if run.repeat_count > 1 %} {{ ngettext("checked %(num)d time since", "checked %(num)d times since", run.repeat_count) }} {{ local_datetime(run.repeat_since) }} {% endif %} {{ local_datetime(run.finished_at or run.started_at, "run-history-time") }} {% if not run.is_finished %} {% endif %} {% if assistant_help | default(false) and run.is_error %} {% endif %} {% if run.problem %}

    {{ run.problem }}

    {% endif %} {% if run.details %}{{ job_details_block(run.details, "run-history-details", run.job_id) }}{% endif %}
  • {% endmacro %}