From ab9734a9d89a2b3ff13ff57e266da746dd1125b2 Mon Sep 17 00:00:00 2001
From: Arthur
Date: Mon, 4 Mar 2024 10:26:51 -0800
Subject: [PATCH] 10587 pagination
---
netbox/extras/views.py | 1 +
netbox/templates/extras/htmx/script_result.html | 2 ++
2 files changed, 3 insertions(+)
diff --git a/netbox/extras/views.py b/netbox/extras/views.py
index ead25e576..2a55135e5 100644
--- a/netbox/extras/views.py
+++ b/netbox/extras/views.py
@@ -1204,6 +1204,7 @@ class ScriptResultView(TableMixin, generic.ObjectView):
if job.completed:
table_logs, table_tests = self.get_table(job, request, bulk_actions=False)
+ breakpoint()
context = {
'script': job.object,
'job': job,
diff --git a/netbox/templates/extras/htmx/script_result.html b/netbox/templates/extras/htmx/script_result.html
index 438adc460..965e2d614 100644
--- a/netbox/templates/extras/htmx/script_result.html
+++ b/netbox/templates/extras/htmx/script_result.html
@@ -19,12 +19,14 @@
{% if job.completed %}
+ {% if table.logs and not table_tests %}
{% include 'htmx/table.html' with table=table_logs %}
+ {% endif %}
{# Script output. Legacy reports will not have this. #}
{% if 'output' in job.data %}