1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

WIP: Moving JobResults out of the admin panel

This commit is contained in:
kkthxbye-code
2022-09-23 13:44:24 +02:00
parent cbb3378d10
commit 06dea8ef3f
7 changed files with 88 additions and 31 deletions

View File

@@ -518,8 +518,7 @@ class JobResult(models.Model):
return str(self.job_id)
def get_absolute_url(self):
# TODO: Fix this to point the right place
return reverse('virtualization:clustertype', args=[self.pk])
return reverse('extras:jobresult', args=[self.pk])
@property
def duration(self):
@@ -560,7 +559,7 @@ class JobResult(models.Model):
)
queue = django_rq.get_queue("default")
if schedule_at := kwargs.pop("schedule_at", None):
job_result.status = JobResultStatusChoices.STATUS_SCHEDULED
job_result.save()