File tree 3 files changed +8
-5
lines changed
templates/admin/huey_monitor/taskmodel
3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ def duration(self, obj):
82
82
'human_update_dt' ,
83
83
'column_name' ,
84
84
'state' ,
85
+ 'name' ,
85
86
'total' ,
86
87
'human_unit' ,
87
88
'human_percentage' ,
@@ -97,6 +98,7 @@ def duration(self, obj):
97
98
)
98
99
ordering = ('-update_dt' ,)
99
100
list_display_links = None
101
+ list_select_related = ('state' ,)
100
102
date_hierarchy = 'create_dt'
101
103
list_filter = ('state__hostname' , 'name' , 'state__signal_name' )
102
104
search_fields = ('name' , 'state__exception_line' , 'state__exception' )
@@ -110,6 +112,7 @@ def duration(self, obj):
110
112
(_ ('Task Information' ), {
111
113
'fields' : (
112
114
'name' ,
115
+ 'desc' ,
113
116
'state' ,
114
117
'human_progress_string' ,
115
118
'signals'
Original file line number Diff line number Diff line change 1
1
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 >
3
3
{% if sub_tasks %}
4
4
< ul style ="white-space: nowrap; ">
5
5
{% for sub_task in sub_tasks %}
6
6
< 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 >
8
8
{{ sub_task.state|default_if_none:"-"|truncatechars:40 }}
9
9
{{ sub_task.human_progress_string }}
10
10
</ li >
Original file line number Diff line number Diff line change 2
2
3
3
{% if main_task %}
4
4
< 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 >
6
6
{{ main_task.state|default_if_none:"" }}
7
7
{{ main_task.human_progress_string }}
8
8
</ p >
24
24
{% for sub_task in sub_tasks %}
25
25
< tr >
26
26
< 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 >
28
28
</ td >
29
29
< td > {{ sub_task.state|default_if_none:"-" }}</ td >
30
30
< td > {{ sub_task.human_progress_string }}</ td >
46
46
</ table >
47
47
{% else %}
48
48
< p > This task has no sub tasks.</ p >
49
- {% endif %}
49
+ {% endif %}
You can’t perform that action at this time.
0 commit comments