mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Merge branch 'develop' into 2921-tags-select2
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load helpers %}
|
||||
{% load static %}
|
||||
|
||||
{% block header %}
|
||||
<div class="row noprint">
|
||||
@@ -134,6 +135,34 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cluster Groups</td>
|
||||
<td>
|
||||
{% if configcontext.cluster_groups.all %}
|
||||
<ul>
|
||||
{% for cluster_group in configcontext.cluster_groups.all %}
|
||||
<li><a href="{{ cluster_group.get_absolute_url }}">{{ cluster_group }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Clusters</td>
|
||||
<td>
|
||||
{% if configcontext.clusters.all %}
|
||||
<ul>
|
||||
{% for cluster in configcontext.clusters.all %}
|
||||
<li><a href="{{ cluster.get_absolute_url }}">{{ cluster }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tenant Groups</td>
|
||||
<td>
|
||||
@@ -183,11 +212,16 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Data</strong>
|
||||
{% include 'extras/inc/configcontext_format.html' %}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<pre>{{ configcontext.data|render_json }}</pre>
|
||||
{% include 'extras/inc/configcontext_data.html' with data=configcontext.data %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
<script src="{% static 'js/configcontext.js' %}?v{{ settings.VERSION }}"></script>
|
||||
{% endblock %}
|
||||
|
@@ -18,6 +18,8 @@
|
||||
{% render_field form.sites %}
|
||||
{% render_field form.roles %}
|
||||
{% render_field form.platforms %}
|
||||
{% render_field form.cluster_groups %}
|
||||
{% render_field form.clusters %}
|
||||
{% render_field form.tenant_groups %}
|
||||
{% render_field form.tenants %}
|
||||
{% render_field form.tags %}
|
||||
|
8
netbox/templates/extras/inc/configcontext_data.html
Normal file
8
netbox/templates/extras/inc/configcontext_data.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{% load helpers %}
|
||||
|
||||
<div class="rendered-context-data" data-format="json">
|
||||
<pre>{{ data|render_json }}</pre>
|
||||
</div>
|
||||
<div class="rendered-context-data" data-format="yaml" style="display: none;">
|
||||
<pre>{{ data|render_yaml }}</pre>
|
||||
</div>
|
6
netbox/templates/extras/inc/configcontext_format.html
Normal file
6
netbox/templates/extras/inc/configcontext_format.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<div class="pull-right">
|
||||
<div class="btn-group btn-group-xs" role="group">
|
||||
<span class="btn btn-default rendered-context-format active" data-format="json">JSON</span>
|
||||
<span class="btn btn-default rendered-context-format" data-format="yaml">YAML</span>
|
||||
</div>
|
||||
</div>
|
@@ -1,5 +1,6 @@
|
||||
{% extends base_template %}
|
||||
{% load helpers %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{ block.super }} - Config Context{% endblock %}
|
||||
|
||||
@@ -9,9 +10,10 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Rendered Context</strong>
|
||||
{% include 'extras/inc/configcontext_format.html' %}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<pre>{{ rendered_context|render_json }}</pre>
|
||||
{% include 'extras/inc/configcontext_data.html' with data=rendered_context %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -22,7 +24,7 @@
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% if obj.local_context_data %}
|
||||
<pre>{{ obj.local_context_data|render_json }}</pre>
|
||||
{% include 'extras/inc/configcontext_data.html' with data=obj.local_context_data %}
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@@ -47,7 +49,7 @@
|
||||
{% if context.description %}
|
||||
<br /><small>{{ context.description }}</small>
|
||||
{% endif %}
|
||||
<pre>{{ context.data|render_json }}</pre>
|
||||
{% include 'extras/inc/configcontext_data.html' with data=context.data %}
|
||||
</div>
|
||||
{% empty %}
|
||||
<div class="panel-body">
|
||||
@@ -58,3 +60,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
<script src="{% static 'js/configcontext.js' %}?v{{ settings.VERSION }}"></script>
|
||||
{% endblock %}
|
||||
|
@@ -265,7 +265,9 @@
|
||||
<th>Name</th>
|
||||
<th>LAG</th>
|
||||
<th>Description</th>
|
||||
<th>MTU</th>
|
||||
<th>Mode</th>
|
||||
<th>Cable</th>
|
||||
<th colspan="2">Connection</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user