1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
netbox-community-netbox/netbox/templates/extras/object_configcontext.html
Arthur Hanson 1a56e8e23b 15148 add copy button to config context (#15954)
* 15148 add copy button to config context

* Merge configcontext_format.html into configcontext_data.html

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-09 08:06:53 -04:00

50 lines
2.1 KiB
HTML

{% extends base_template %}
{% load helpers %}
{% load static %}
{% load i18n %}
{% block content %}
<div class="row">
<div class="col col-md-6">
<div class="card">
{% include 'extras/inc/configcontext_data.html' with title="Rendered Context" data=rendered_context format=format copyid="rendered_context" %}
</div>
</div>
<div class="col col-md-6">
<div class="card">
{% include 'extras/inc/configcontext_data.html' with title="Local Context" data=object.local_context_data format=format copyid="local_context" %}
<div class="card-footer">
<span class="help-block">
<i class="mdi mdi-information-outline"></i>
{% trans "The local config context overwrites all source contexts" %}.
</span>
</div>
</div>
<div class="card">
<h5 class="card-header d-flex justify-content-between">
{% trans "Source Contexts" %}
<div>
{% include 'extras/inc/format_toggle.html' %}
</div>
</h5>
{% for context in source_contexts %}
<div class="card-body">
<div class="float-end">
<span class="text-muted">{{ context.weight }}</span>
</div>
<strong>{{ context|linkify:"name" }}</strong>
{% if context.description %}
<br /><small>{{ context.description }}</small>
{% endif %}
{% include 'extras/inc/configcontext_data.html' with data=context.data format=format %}
</div>
{% empty %}
<div class="card-body">
<span class="text-muted">{% trans "None found" %}</span>
</div>
{% endfor %}
</div>
</div>
</div>
{% endblock %}