mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-07 18:03:47 +02:00
Compare commits
1 Commits
main
...
21814-cust
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97467009ff |
@@ -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):
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<h2 class="card-header" id="module{{ module.pk }}">
|
||||
<i class="mdi mdi-file-document-outline"></i> {{ module }}
|
||||
<div class="card-actions">
|
||||
{% if perms.extras.change_scriptmodule %}
|
||||
{% if perms.extras.edit_scriptmodule %}
|
||||
<a href="{% url 'extras:scriptmodule_edit' pk=module.pk %}" class="btn btn-ghost-warning btn-sm">
|
||||
<i class="mdi mdi-pencil" aria-hidden="true"></i> {% trans "Edit" %}
|
||||
</a>
|
||||
@@ -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