mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-08 18:33:48 +02:00
This commit is contained in:
@@ -467,7 +467,7 @@ class JobsMixin(models.Model):
|
||||
"""
|
||||
Return a list of the most recent jobs for this instance.
|
||||
"""
|
||||
return self.jobs.filter(status__in=JobStatusChoices.TERMINAL_STATE_CHOICES).order_by('-created').defer('data')
|
||||
return self.jobs.filter(status__in=JobStatusChoices.TERMINAL_STATE_CHOICES).order_by('-started').defer('data')
|
||||
|
||||
|
||||
class JournalingMixin(models.Model):
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<td>{{ script.python_class.description|markdown|placeholder }}</td>
|
||||
{% if last_job %}
|
||||
<td>
|
||||
<a href="{% url 'extras:script_result' job_pk=last_job.pk %}">{{ last_job.created|isodatetime }}</a>
|
||||
<a href="{% url 'extras:script_result' job_pk=last_job.pk %}">{{ last_job.started|isodatetime }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{% badge last_job.get_status_display last_job.get_status_color %}
|
||||
|
||||
Reference in New Issue
Block a user