|
3 | 3 | {% block title %}Queues {{ block.super }}{% endblock %} |
4 | 4 |
|
5 | 5 | {% block extrastyle %} |
6 | | - {{ block.super }} |
7 | | - <style>table {width: 100%;}</style> |
| 6 | + {{ block.super }} |
| 7 | + <style> |
| 8 | + table { |
| 9 | + width: 100%; |
| 10 | + } |
| 11 | + </style> |
8 | 12 | {% endblock %} |
9 | 13 |
|
10 | 14 | {% block content_title %}<h1>ARQ Queues</h1>{% endblock %} |
11 | 15 |
|
12 | 16 | {% block breadcrumbs %} |
13 | | - <div class="breadcrumbs"> |
14 | | - <a href="{% url 'admin:index' %}">Home</a> › |
15 | | - <a href="{% url 'arq_admin:home' %}">Django ARQ</a> |
16 | | - </div> |
| 17 | + <div class="breadcrumbs"> |
| 18 | + <a href="{% url 'admin:index' %}">Home</a> › |
| 19 | + <a href="{% url 'arq_admin:home' %}">Django ARQ</a> |
| 20 | + </div> |
17 | 21 | {% endblock %} |
18 | 22 |
|
19 | 23 | {% block content %} |
20 | 24 |
|
21 | | -<div id="content-main"> |
| 25 | + <div id="content-main"> |
22 | 26 |
|
23 | 27 | <div class="module"> |
24 | | - <table> |
25 | | - <thead> |
26 | | - <tr> |
27 | | - <th>Name</th> |
28 | | - <th>Queued Jobs</th> |
29 | | - <th>Deferred Jobs</th> |
30 | | - <th>Running Jobs</th> |
31 | | - <th>Host</th> |
32 | | - <th>Port</th> |
33 | | - <th>DB</th> |
34 | | - </tr> |
35 | | - </thead> |
36 | | - <tbody> |
37 | | - {% for queue in object_list %} |
38 | | - <tr class = "{% cycle 'row1' 'row2' %}"> |
39 | | - <th> |
40 | | - <a href="{% url 'arq_admin:all_jobs' queue.name %}"> |
41 | | - {{ queue.name }} |
42 | | - </a> |
43 | | - </th> |
44 | | - <td> |
45 | | - <a href="{% url 'arq_admin:queued_jobs' queue.name %}"> |
46 | | - {{ queue.queued_jobs }} |
47 | | - </a> |
48 | | - </td> |
49 | | - <th> |
50 | | - <a href="{% url 'arq_admin:deferred_jobs' queue.name %}"> |
51 | | - {{ queue.deferred_jobs }} |
52 | | - </a> |
53 | | - </th> |
54 | | - <th> |
55 | | - <a href="{% url 'arq_admin:running_jobs' queue.name %}"> |
56 | | - {{ queue.running_jobs }} |
57 | | - </a> |
58 | | - </th> |
59 | | - <td>{{ queue.host }}</td> |
60 | | - <td>{{ queue.port }}</td> |
61 | | - <td>{{ queue.database }}</td> |
62 | | - </tr> |
63 | | - {% endfor %} |
64 | | - </tbody> |
65 | | - </table> |
| 28 | + {% for queue in object_list %} |
| 29 | + {% if queue.error %} |
| 30 | + <h2>{{ queue.name }} - <span style="color: red;">{{ queue.error }}</span></h2> |
| 31 | + {% endif %} |
| 32 | + {% endfor %} |
| 33 | + <table> |
| 34 | + <thead> |
| 35 | + <tr> |
| 36 | + <th>Name</th> |
| 37 | + <th>Queued Jobs</th> |
| 38 | + <th>Deferred Jobs</th> |
| 39 | + <th>Running Jobs</th> |
| 40 | + <th>Host</th> |
| 41 | + <th>Port</th> |
| 42 | + <th>DB</th> |
| 43 | + </tr> |
| 44 | + </thead> |
| 45 | + <tbody> |
| 46 | + {% for queue in object_list %} |
| 47 | + <tr class="{% cycle 'row1' 'row2' %}"> |
| 48 | + <th> |
| 49 | + <a href="{% url 'arq_admin:all_jobs' queue.name %}"> |
| 50 | + {{ queue.name }} |
| 51 | + </a> |
| 52 | + </th> |
| 53 | + <td> |
| 54 | + {% if queue.queued_jobs is None %} |
| 55 | + — |
| 56 | + {% else %} |
| 57 | + <a href="{% url 'arq_admin:queued_jobs' queue.name %}"> |
| 58 | + {{ queue.queued_jobs }} |
| 59 | + </a> |
| 60 | + {% endif %} |
| 61 | + </td> |
| 62 | + <th> |
| 63 | + {% if queue.deferred_jobs is None %} |
| 64 | + — |
| 65 | + {% else %} |
| 66 | + <a href="{% url 'arq_admin:deferred_jobs' queue.name %}"> |
| 67 | + {{ queue.deferred_jobs }} |
| 68 | + </a> |
| 69 | + {% endif %} |
| 70 | + </th> |
| 71 | + <th> |
| 72 | + {% if queue.running_jobs is None %} |
| 73 | + — |
| 74 | + {% else %} |
| 75 | + <a href="{% url 'arq_admin:running_jobs' queue.name %}"> |
| 76 | + {{ queue.running_jobs }} |
| 77 | + </a> |
| 78 | + {% endif %} |
| 79 | + </th> |
| 80 | + <td>{{ queue.host }}</td> |
| 81 | + <td>{{ queue.port }}</td> |
| 82 | + <td>{{ queue.database }}</td> |
| 83 | + </tr> |
| 84 | + {% endfor %} |
| 85 | + </tbody> |
| 86 | + </table> |
66 | 87 | </div> |
67 | | -</div> |
| 88 | + </div> |
68 | 89 |
|
69 | 90 | {% endblock %} |
0 commit comments