File tree Expand file tree Collapse file tree
templates/admin/huey_monitor/taskmodel Expand file tree Collapse file tree Original file line number Diff line number Diff 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'
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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 >
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 >
4646 </ table >
4747{% else %}
4848 < p > This task has no sub tasks.</ p >
49- {% endif %}
49+ {% endif %}
You can’t perform that action at this time.
0 commit comments