{% extends 'timeseer.html' %} {% from 'macros.html' import pagination %} {% from 'configure.html' import configure_menu with context %} {% block styles %} {% endblock %} {% macro visualize_sorting(sort_field, sort_direction, field) %} {% if sort_field == field %} {% if sort_direction == 'asc' %} {% set other_direction = 'desc' %} {% else %} {% set other_direction = 'asc' %} {% endif %} {{ caller() }} {% if sort_direction == 'desc' %} {{ bootstrap_icon('caret-down-fill') }} {% else %} {{ bootstrap_icon('caret-up-fill') }} {% endif %} {% else %} {{ caller() }} {% if sort_direction == 'desc' %} {{ bootstrap_icon('caret-down', 'text-secondary') }} {% else %} {{ bootstrap_icon('caret-up', 'text-secondary') }} {% endif %} {% endif %} {% endmacro %} {% block menu %} {{ configure_menu('Background jobs') }} {% endblock %} {% block main %}

Background jobs

{% if source_name is not none %} {% endif %}
{% if state_filter is not none %} Remove filter {% endif %}
{% if background_jobs|count > 0 %}
{{ pagination( paging, url_for('.list_background_jobs', sourcename=source_name, page=paging.page-1, sort=sort_field, direction=sort_direction, filter=state_filter.name), url_for('.list_background_jobs', sourcename=source_name, page=paging.page+1, sort=sort_field, direction=sort_direction, filter=state_filter.name) ) }} {% for job in background_jobs %} {% if job.error is not none %} {% endif %} {% if background_job is not none and job.db_id == background_job.db_id %} {% endif %} {% endfor %}
{% call visualize_sorting(sort_field, sort_direction, 'name') %} Name {% endcall %} {% call visualize_sorting(sort_field, sort_direction, 'state') %} State {% endcall %} {% call visualize_sorting(sort_field, sort_direction, 'creation_date') %} Creation date {% endcall %} {% call visualize_sorting(sort_field, sort_direction, 'start_date') %} Start date {% endcall %} {% call visualize_sorting(sort_field, sort_direction, 'end_date') %} End date {% endcall %} Error
{% if background_job is not none and job.db_id == background_job.db_id %} {% else %} {% endif %} {{ job.name}} {{ job.state.value|capitalize}} {{ job.creation_date|datetimeformat}} {{ job.start_date|datetimeformat}} {{ job.end_date|datetimeformat}} {% if job.error is not none %} {% endif %}
{{ job.error }}
                        
{% if background_job.arguments|count > 0 %}
Arguments
{% for name, argument in background_job.arguments|dictsort %} {% if name == 'series_id' %} {% else %} {% endif %} {% endfor %}
Name Value
{{ name }} {{ argument }} {{ argument }}
{% endif %} {% if tasks|count > 0 %}
Tasks
{% for task in tasks|sort(attribute='name') %} {% if task.error is not none %} {% endif %} {% endfor %}
Name State Error
{{ task.name }} {{ task.state.value|capitalize }} {% if task.error is not none %} {% endif %}
{{ task.error }}
                                        
{% endif %}
{{ pagination( paging, url_for('.list_background_jobs', sourcename=source_name, page=paging.page-1, sort=sort_field, direction=sort_direction, filter=state_filter.name), url_for('.list_background_jobs', sourcename=source_name, page=paging.page+1, sort=sort_field, direction=sort_direction, filter=state_filter.name) ) }}
{% else %}
No background jobs matching filter criteria found.
{% endif %} {% endblock %}