This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/passbook/admin/templates/administration/task/list.html

85 lines
3.4 KiB
HTML
Raw Normal View History

2020-10-16 09:28:54 +00:00
{% extends "administration/base.html" %}
{% load i18n %}
{% load humanize %}
{% load passbook_utils %}
{% block content %}
<section class="pf-c-page__main-section pf-m-light">
<div class="pf-c-content">
<h1>
2020-10-16 12:36:40 +00:00
<i class="pf-icon pf-icon-automation"></i>
2020-10-16 09:28:54 +00:00
{% trans 'System Tasks' %}
</h1>
2020-10-16 12:36:40 +00:00
<p>{% trans "Long-running operations which passbook executes in the background." %}</p>
2020-10-16 09:28:54 +00:00
</div>
</section>
<section class="pf-c-page__main-section pf-m-no-padding-mobile">
<div class="pf-c-card">
<div class="pf-c-toolbar">
<div class="pf-c-toolbar__content">
<button role="pb-refresh" class="pf-c-button pf-m-primary">
{% trans 'Refresh' %}
</button>
</div>
</div>
2020-10-16 09:28:54 +00:00
<table class="pf-c-table pf-m-compact pf-m-grid-xl" role="grid">
<thead>
<tr role="row">
<th role="columnheader" scope="col">{% trans 'Identifier' %}</th>
<th role="columnheader" scope="col">{% trans 'Description' %}</th>
<th role="columnheader" scope="col">{% trans 'Last Run' %}</th>
2020-10-16 09:28:54 +00:00
<th role="columnheader" scope="col">{% trans 'Status' %}</th>
<th role="columnheader" scope="col">{% trans 'Messages' %}</th>
2020-10-16 12:10:27 +00:00
<th role="cell"></th>
2020-10-16 09:28:54 +00:00
</tr>
</thead>
<tbody role="rowgroup">
2020-10-16 12:36:40 +00:00
{% for task in object_list %}
2020-10-16 09:28:54 +00:00
<tr role="row">
<th role="columnheader">
<pre>{{ task.task_name }}</pre>
2020-10-16 09:28:54 +00:00
</th>
<td role="cell">
<span>
{{ task.task_description }}
</span>
</td>
<td role="cell">
<span>
{{ task.finish_timestamp|naturaltime }}
</span>
</td>
<td role="cell">
<span>
{% if task.result.status == task_successful %}
<i class="fas fa-check pf-m-success"></i> {% trans 'Successful' %}
{% elif task.result.status == task_warning %}
<i class="fas fa-exclamation-triangle pf-m-warning"></i> {% trans 'Warning' %}
{% elif task.result.status == task_error %}
<i class="fas fa-times pf-m-danger"></i> {% trans 'Error' %}
{% else %}
<i class="fas fa-question-circle"></i> {% trans 'Unknown' %}
{% endif %}
</span>
</td>
<td>
{% for message in task.result.messages %}
<div>
{{ message }}
</div>
{% endfor %}
</td>
2020-10-16 12:10:27 +00:00
<td>
<pb-action-button url="{% url 'passbook_api:admin_system_tasks-retry' pk=task.task_name %}">
2020-10-16 12:10:27 +00:00
{% trans 'Retry Task' %}
</pb-action-button>
2020-10-16 12:10:27 +00:00
</td>
2020-10-16 09:28:54 +00:00
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
{% endblock %}