Skip to content

Commit d18bbe4

Browse files
Dmitry Smirnovjeremystretch
authored andcommitted
add tag copy_content and id 'job_data_output'
1 parent 99e367c commit d18bbe4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

netbox/templates/extras/htmx/script_result.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ <h2 class="card-header">{% trans "Log" %}</h2>
4444
<div class="htmx-container table-responsive"
4545
hx-get="{% url 'extras:script_result' job_pk=job.pk %}?embedded=True&log=True&log_threshold={{log_threshold}}"
4646
hx-target="this"
47-
hx-trigger="load" hx-select=".htmx-container" hx-swap="outerHTML"
48-
></div>
47+
hx-trigger="load" hx-select=".htmx-container" hx-swap="outerHTML">
48+
</div>
4949
</div>
5050
</div>
5151
{% endif %}
@@ -60,11 +60,12 @@ <h2 class="card-header d-flex justify-content-between">
6060
<a href="?export=output" class="btn btn-sm btn-primary" role="button">
6161
<i class="mdi mdi-download" aria-hidden="true"></i> {% trans "Download" %}
6262
</a>
63+
{% copy_content "job_data_output" %}
6364
</div>
6465
{% endif %}
6566
</h2>
6667
{% if job.data.output %}
67-
<pre class="card-body font-monospace">{{ job.data.output }}</pre>
68+
<pre class="card-body font-monospace" id="job_data_output">{{ job.data.output }}</pre>
6869
{% else %}
6970
<div class="card-body text-muted">{% trans "None" %}</div>
7071
{% endif %}

0 commit comments

Comments
 (0)