1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Moved object context rendering to ObjectConfigContextView and standardized the template

This commit is contained in:
Jeremy Stretch
2018-06-28 13:48:12 -04:00
parent b952ec73ce
commit 62989ecb6e
8 changed files with 88 additions and 72 deletions

View File

@@ -0,0 +1,35 @@
{% extends base_template %}
{% load helpers %}
{% block title %}{{ block.super }} - Config Context{% endblock %}
{% block content %}
<div class="row">
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<strong>Rendered Context</strong>
</div>
<div class="panel-body">
<pre>{{ rendered_context|render_json }}</pre>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<strong>Source Contexts</strong>
</div>
{% for context in source_contexts %}
<div class="panel-body">
<div class="pull-right">
<span class="text-muted">{{ context.weight }}</span>
</div>
<a href="{{ context.get_absolute_url }}"><strong>{{ context.name }}</strong></a>
<pre>{{ context.data|render_json }}</pre>
</div>
{% endfor %}
</div>
</div>
</div>
{% endblock %}