abuse background_task queue field to store the source uuid for later easy filtering
This commit is contained in:
@@ -13,18 +13,24 @@
|
||||
<div class="col s12">
|
||||
<div class="collection">
|
||||
{% for task in tasks %}
|
||||
<span class="collection-item">
|
||||
|
||||
{% if task.has_error %}
|
||||
<span class="collection-item">
|
||||
<i class="fas fa-exclamation-triangle"></i> <strong>{{ task.verbose_name }}</strong><br>
|
||||
Source: "{{ task.queue }}"<br>
|
||||
Error: "{{ task.error_message }}"<br>
|
||||
<i class="far fa-clock"></i> Task started at <strong>{{ task.run_at|date:'Y-m-d H:i:s' }}</strong>
|
||||
<i class="far fa-clock"></i> Task ran at <strong>{{ task.run_at|date:'Y-m-d H:i:s' }}</strong>
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="collection-item">
|
||||
<i class="fas fa-check"></i> <strong>{{ task.verbose_name }}</strong><br>
|
||||
<i class="far fa-clock"></i> Task started at <strong>{{ task.run_at|date:'Y-m-d H:i:s' }}</strong>
|
||||
Source: "{{ task.queue }}"<br>
|
||||
<i class="far fa-clock"></i> Task ran at <strong>{{ task.run_at|date:'Y-m-d H:i:s' }}</strong>
|
||||
</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% empty %}
|
||||
<span class="collection-item no-items"><i class="fas fa-info-circle"></i> There have been no completed tasks.</span>
|
||||
<span class="collection-item no-items"><i class="fas fa-info-circle"></i> There have been no completed tasks{% if source %} that match the specified source filter{% endif %}.</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -64,9 +64,9 @@
|
||||
<div class="collection">
|
||||
{% for task in scheduled %}
|
||||
<a href="{% url task.url pk=task.instance.pk %}" class="collection-item">
|
||||
<i class="far fa-stopwatch"></i> <strong>{{ task }}</strong><br>
|
||||
Scheduled to run {{ task.instance.get_index_schedule_display|lower }}.<br>
|
||||
<i class="fas fa-redo"></i> Task will run at <strong>{{ task.run_at|date:'Y-m-d H:i:s' }}</strong>
|
||||
<i class="fas fa-stopwatch"></i> <strong>{{ task }}</strong><br>
|
||||
{% if task.instance.index_schedule %}Scheduled to run {{ task.instance.get_index_schedule_display|lower }}.<br>{% endif %}
|
||||
<i class="fas fa-redo"></i> Task will next run at <strong>{{ task.run_at|date:'Y-m-d H:i:s' }}</strong>
|
||||
</a>
|
||||
{% empty %}
|
||||
<span class="collection-item no-items"><i class="fas fa-info-circle"></i> There are no scheduled tasks.</span>
|
||||
|
||||
Reference in New Issue
Block a user