Merge pull request #19162 from alehaa/19040-copy-rendered-config

Fixes #19040: Add button to copy rendered config to clipboard
This commit is contained in:
bctiemann 2025-04-15 18:00:47 -04:00 committed by GitHub
commit 2356a3c125
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,11 +54,14 @@
<div class="card">
<h2 class="card-header d-flex justify-content-between">
{% trans "Rendered Config" %}
<a href="?export=True" class="btn btn-primary lh-1" role="button">
<i class="mdi mdi-download" aria-hidden="true"></i> {% trans "Download" %}
</a>
<div>
{% copy_content "rendered_config" %}
<a href="?export=True" class="btn btn-primary lh-1" role="button">
<i class="mdi mdi-download" aria-hidden="true"></i> {% trans "Download" %}
</a>
</div>
</h2>
<pre class="card-body">{{ rendered_config }}</pre>
<pre class="card-body" id="rendered_config">{{ rendered_config }}</pre>
</div>
{% else %}
<div class="alert alert-warning">