Files @ 90fac7c6abb9
Branch filter:

Location: conntrackt/conntrackt/templates/conntrackt/entity_detail.html

branko
Renamed the tags library. Removed the line stripper middleware, and replaced it with some custom code that will remove all blank lines. The iptables rule rendering has been rewritten to accomodate this change (a utility function has been added for generating them). Fixed some code styling.
{% extends "conntrackt/template.html" %}

{# For html_link. #}
{% load conntrackt_tags %}

{% block content %}
{# Use a bit shorter variable names. #}
{% with project=entity.project location=entity.location %}

{% if entity %}
<h1>{{entity.name}}</h1>
<dl>
  <dt>Project</dt><dd>{% html_link project.name 'project'  project.id  %}</dd>
  <dt>Location</dt><dd>{{location.name}}</dd>
  <dt>Incoming communications</dt><dd><ul class="unstyled">{% for interface in entity.interface_set.all %}
    {% for communication in interface.destination_set.all %}
    <li>{{communication.source}} - {{communication.protocol}}: {{communication.port}}</li>
    {% endfor %}{% endfor %}</ul></dd>
    <dt>Outgoing communications</dt><dd><ul class="unstyled">{% for interface in entity.interface_set.all %}
  {% for communication in interface.source_set.all %}
      <li>{{communication.destination}} - {{communication.protocol}}: {{communication.port}}</li>
{% endfor %}{% endfor %}</ul></dd>
      <dt>iptables rules</dt><dd><pre>{{ entity_iptables }}</pre>{% html_link 'Download' 'entity_iptables' entity.id class="btn btn-primary" %}</dd>
</dl>
{% endif %}
{% endwith %}
{% endblock %}