-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
background_jobs.html
40 lines (40 loc) · 1.3 KB
/
background_jobs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<div class="list-jobs">
{% if jobs.length %}
<table class="table table-bordered" style="table-layout: fixed;">
<thead>
<tr>
<th style="width: 20%">{{ _("Queue / Worker") }}</th>
<th>{{ _("Job") }}</th>
<th style="width: 15%">{{ _("Created") }}</th>
</tr>
</thead>
<tbody>
{% for j in jobs %}
<tr>
<td><span class="indicator {{ j.color }}" title="{{ j.status }}">{{ j.queue.split(".").slice(-1)[0] }}</span></td>
<td style="overflow: auto;">
<div>
{{ frappe.utils.encode_tags(j.job_name) }}
</div>
{% if j.exc_info %}
<div>
<pre>{{ frappe.utils.encode_tags(j.exc_info) }}</pre>
</div>
{% endif %}
</td>
<td class="small">{{ j.creation }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<p>
<span class="indicator blue" style="margin-right: 20px;">{{ _("Started") }}</span>
<span class="indicator orange" style="margin-right: 20px;">{{ _("Queued") }}</span>
<span class="indicator red" style="margin-right: 20px;">{{ _("Failed") }}</span>
<span class="indicator green">{{ _("Finished") }}</span>
</p>
{% else %}
<p class="text-muted">{{ _("No pending or current jobs for this site") }}</p>
{% endif %}
<p class="text-muted" style="margin-top: 30px;">{{ _("Last refreshed") }} {{ frappe.datetime.now_datetime() }}</p>
</div>