mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-13 02:58:17 -06:00
15148 add copy button to config context
This commit is contained in:
parent
0cc2963e6f
commit
5b7c392d81
@ -1,5 +1,5 @@
|
|||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
<div class="rendered-context-data mt-1">
|
<div class="rendered-context-data mt-1">
|
||||||
<pre class="block">{% if format == 'json' %}{{ data|json }}{% elif format == 'yaml' %}{{ data|yaml }}{% else %}{{ data }}{% endif %}</pre>
|
<pre class="block" {% if copyid %}id="{{ copyid }}{% endif %}">{% if format == 'json' %}{{ data|json }}{% elif format == 'yaml' %}{{ data|yaml }}{% else %}{{ data }}{% endif %}</pre>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
<div>
|
<div>
|
||||||
|
{% if copyid %}
|
||||||
|
{% copy_content copyid %}
|
||||||
|
{% endif %}
|
||||||
<div class="btn-group btn-group-sm" role="group">
|
<div class="btn-group btn-group-sm" role="group">
|
||||||
<a href="?format=json" type="button" class="btn btn-outline-dark{% if format == 'json' %} active{% endif %}">JSON</a>
|
<a href="?format=json" type="button" class="btn btn-outline-dark{% if format == 'json' %} active{% endif %}">JSON</a>
|
||||||
<a href="?format=yaml" type="button" class="btn btn-outline-dark{% if format == 'yaml' %} active{% endif %}">YAML</a>
|
<a href="?format=yaml" type="button" class="btn btn-outline-dark{% if format == 'yaml' %} active{% endif %}">YAML</a>
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<h5 class="card-header d-flex justify-content-between">
|
<h5 class="card-header d-flex justify-content-between">
|
||||||
{% trans "Rendered Context" %}
|
{% trans "Rendered Context" %}
|
||||||
{% include 'extras/inc/configcontext_format.html' %}
|
{% include 'extras/inc/configcontext_format.html' with copyid="rendered_context" %}
|
||||||
</h5>
|
</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% include 'extras/inc/configcontext_data.html' with data=rendered_context format=format %}
|
{% include 'extras/inc/configcontext_data.html' with data=rendered_context format=format copyid="rendered_context" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user