Skip to content

Commit

Permalink
Merge f6b9e13 into e147acd
Browse files Browse the repository at this point in the history
  • Loading branch information
Skrattoune authored Jan 28, 2022
2 parents e147acd + f6b9e13 commit f5404f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions huey_monitor/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def duration(self, obj):
'human_update_dt',
'column_name',
'state',
'name',
'total',
'human_unit',
'human_percentage',
Expand All @@ -97,6 +98,7 @@ def duration(self, obj):
)
ordering = ('-update_dt',)
list_display_links = None
list_select_related = ('state',)
date_hierarchy = 'create_dt'
list_filter = ('state__hostname', 'name', 'state__signal_name')
search_fields = ('name', 'state__exception_line', 'state__exception')
Expand All @@ -110,6 +112,7 @@ def duration(self, obj):
(_('Task Information'), {
'fields': (
'name',
'desc',
'state',
'human_progress_string',
'signals'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

<strong><a href="{{ main_task.admin_link }}">{{ main_task.name }}</a></strong>
<strong><a href="{{ main_task.admin_link }}">{% firstof main_task.desc main_task.name %}</a></strong>
{% if sub_tasks %}
<ul style="white-space: nowrap;">
{% for sub_task in sub_tasks %}
<li>
<a href="{{ sub_task.admin_link }}">{{ sub_task.name }}</a>
<a href="{{ sub_task.admin_link }}">{% firstof sub_task.desc sub_task.name %}</a>
{{ sub_task.state|default_if_none:"-"|truncatechars:40 }}
{{ sub_task.human_progress_string }}
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% if main_task %}
<p>
<a href="{{ main_task.admin_link }}">{{ main_task.name }}</a>
<a href="{{ main_task.admin_link }}">{% firstof main_task.desc main_task.name %}</a>
{{ main_task.state|default_if_none:"" }}
{{ main_task.human_progress_string }}
</p>
Expand All @@ -24,7 +24,7 @@
{% for sub_task in sub_tasks %}
<tr>
<td>
<a href="{{ sub_task.admin_link }}">{{ sub_task.name }}</a>
<a href="{{ sub_task.admin_link }}">{% firstof sub_task.desc sub_task.name %}</a>
</td>
<td>{{ sub_task.state|default_if_none:"-" }}</td>
<td>{{ sub_task.human_progress_string }}</td>
Expand All @@ -46,4 +46,4 @@
</table>
{% else %}
<p>This task has no sub tasks.</p>
{% endif %}
{% endif %}

0 comments on commit f5404f9

Please sign in to comment.