Skip to content

Commit f5404f9

Browse files
authored
Merge f6b9e13 into e147acd
2 parents e147acd + f6b9e13 commit f5404f9

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

huey_monitor/admin.py

+3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def duration(self, obj):
8282
'human_update_dt',
8383
'column_name',
8484
'state',
85+
'name',
8586
'total',
8687
'human_unit',
8788
'human_percentage',
@@ -97,6 +98,7 @@ def duration(self, obj):
9798
)
9899
ordering = ('-update_dt',)
99100
list_display_links = None
101+
list_select_related = ('state',)
100102
date_hierarchy = 'create_dt'
101103
list_filter = ('state__hostname', 'name', 'state__signal_name')
102104
search_fields = ('name', 'state__exception_line', 'state__exception')
@@ -110,6 +112,7 @@ def duration(self, obj):
110112
(_('Task Information'), {
111113
'fields': (
112114
'name',
115+
'desc',
113116
'state',
114117
'human_progress_string',
115118
'signals'

huey_monitor/templates/admin/huey_monitor/taskmodel/column_name.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

2-
<strong><a href="{{ main_task.admin_link }}">{{ main_task.name }}</a></strong>
2+
<strong><a href="{{ main_task.admin_link }}">{% firstof main_task.desc main_task.name %}</a></strong>
33
{% if sub_tasks %}
44
<ul style="white-space: nowrap;">
55
{% for sub_task in sub_tasks %}
66
<li>
7-
<a href="{{ sub_task.admin_link }}">{{ sub_task.name }}</a>
7+
<a href="{{ sub_task.admin_link }}">{% firstof sub_task.desc sub_task.name %}</a>
88
{{ sub_task.state|default_if_none:"-"|truncatechars:40 }}
99
{{ sub_task.human_progress_string }}
1010
</li>

huey_monitor/templates/admin/huey_monitor/taskmodel/task_hierarchy_info.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{% if main_task %}
44
<p>
5-
<a href="{{ main_task.admin_link }}">{{ main_task.name }}</a>
5+
<a href="{{ main_task.admin_link }}">{% firstof main_task.desc main_task.name %}</a>
66
{{ main_task.state|default_if_none:"" }}
77
{{ main_task.human_progress_string }}
88
</p>
@@ -24,7 +24,7 @@
2424
{% for sub_task in sub_tasks %}
2525
<tr>
2626
<td>
27-
<a href="{{ sub_task.admin_link }}">{{ sub_task.name }}</a>
27+
<a href="{{ sub_task.admin_link }}">{% firstof sub_task.desc sub_task.name %}</a>
2828
</td>
2929
<td>{{ sub_task.state|default_if_none:"-" }}</td>
3030
<td>{{ sub_task.human_progress_string }}</td>
@@ -46,4 +46,4 @@
4646
</table>
4747
{% else %}
4848
<p>This task has no sub tasks.</p>
49-
{% endif %}
49+
{% endif %}

0 commit comments

Comments
 (0)