{% extends 'base/layout.html' %}
{% load render_table from django_tables2 %}
{% load i18n %}
{% block title %}{% trans "Collection run" %} #{{ job.pk }}{% endblock %}
{% block head %}
{{ block.super }}
{% if running %}{% endif %}
{% endblock %}
{% block content %}
| {% trans "Status" %} | {% badge job.get_status_display bg_color=job.get_status_color %}{% if running %} {% trans "(this page refreshes every 5 seconds)" %}{% endif %} |
| {% trans "Devices" %} | {{ data.target|placeholder }} |
| {% trans "Started by" %} | {% if job.object %}{{ job.object|linkify }} · {% endif %}{{ job.user|placeholder }} |
| {% trans "Created" %} | {{ job.created|isodatetime }} |
| {% trans "Started" %} | {{ job.started|isodatetime|placeholder }} |
| {% trans "Completed" %} | {{ job.completed|isodatetime|placeholder }} |
{% if data.progress and running %}
| {% trans "Progress" %} | {{ data.progress.done }} / {{ data.progress.total }} |
{% endif %}
{% with s=data.summary %}
| {% trans "Devices" %} | {% if s %}{{ s.total }}{% else %}—{% endif %} |
| {% trans "Succeeded" %} | {% if s %}{{ s.succeeded }}{% else %}—{% endif %} |
| {% trans "Failed" %} | {% if s %}{{ s.failed }}{% else %}—{% endif %} |
| {% trans "Skipped" %} | {% if s %}{{ s.skipped }}{% else %}—{% endif %} |
| {% trans "Configs changed" %} | {% if s %}{{ s.changed }}{% else %}—{% endif %} |
{% endwith %}
| {% trans "Git commit" %} |
{% if data.commit.sha %}{{ data.commit.sha|slice:":8" }} ({{ data.commit.files }} {% trans "file(s)" %}){% elif data.commit %}{% trans "no changes" %}{% else %}—{% endif %}
{% if data.commit.pushed %}{% trans "pushed" %}{% elif data.commit.pushed is False %}{% trans "push failed" %}{% endif %}
|
{% if data.errors %}
| {% trans "Problems" %} | {% for error in data.errors %}{{ error }}{% if not forloop.last %} {% endif %}{% endfor %} |
{% endif %}
{% render_table results_table 'inc/table.html' %}
{% for entry in log_entries %}
| {{ entry.timestamp|slice:"11:19" }} |
{% if entry.level == "error" %}error{% elif entry.level == "warning" %}warning{% else %}{{ entry.level }}{% endif %} |
{{ entry.message }} |
{% empty %}
| {% trans "No log entries yet." %} |
{% endfor %}
{% endblock %}