{% extends "base.html" %} {% load i18n %} {% load django_bootstrap5 %} {% load bootstrap_icons %} {% load operations %} {% block title %}{% trans "Jobs" %}{% endblock %} {% block page_heading %}{% trans "Jobs" %}{% endblock page_heading %} {% block content %} {% if worker_unavailable %}
{% bs_icon 'exclamation-triangle' %} {% trans "Worker unavailable, last seen" %} {% if worker_last_seen %}{{ worker_last_seen|date:"Y-m-d H:i:s T" }}{% else %}{% trans "never" %}{% endif %}
{% endif %}
{% trans "Jobs" %} {{ page.paginator.count }} {% if request.user.is_superuser %} {% endif %}
{% if not rows %}
{% trans "No jobs" %}
{% else %}
{% if request.user.is_superuser %}{% endif %} {% for op, row in rows %} {% if request.user.is_superuser %}{% endif %} {% endfor %}
{% trans "Job" %} {% trans "Resource" %}{% trans "User" %}{% trans "State" %}
{{ row.label }} {% if op.state in active_states %} {% if row.phase or op.progress_total %}
{{ row.phase }} {% if op.progress_total %} {% if row.phase %}·{% endif %} {% if op.kind in bytes_kinds %}{{ op.progress_done|default:0|filesizeformat }} / {{ op.progress_total|filesizeformat }}{% else %}{{ op.progress_done|default:0 }} / {{ op.progress_total }}{% endif %} {% endif %}
{% endif %} {% if op.progress_total %} {% widthratio op.progress_done|default:0 op.progress_total 100 as percent %}
{% endif %} {% elif op.state == "failed" or op.state == "uncertain" %}
{{ row.error|truncatechars:80 }}
{% endif %}
{{ op.created_at|date:"Y-m-d H:i:s T" }}{% if request.user.is_superuser %} · {{ row.username }}{% endif %}
{# below md the hidden columns show here #}
{{ row.resource_label|wrap_at_slash }}
{{ row.resource_label|wrap_at_slash }}{{ row.username }}{% include "operations/state_badge.html" with state=op.state %}
{% endif %}
{% if page.has_other_pages %} {% bootstrap_pagination page extra=page_query %} {% endif %} {% endblock %} {% block script %} {% if follow %}{% include "operations/follow_active.html" %}{% endif %} {% endblock script %}