Files @ 5c7da7c67a3e
Branch filter:

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

branko
Noticket: Added a check for existing communications when attempting to move entity to a different project. Includes test of new functionality.
{% extends "conntrackt/base.html" %}

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

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

{% if entity %}
<div class="row">
  <h1 class="span12">{{entity.name}}</h1>
</div>

{% if entity.description %}
<div class="row">
  <div class="span12">
    {{entity.description}}
  </div>
</div>
<hr>
{% endif %}
<div class="row">
  <div class="span12">
    {% html_link "Edit" "entity_update" entity.id class="btn btn-primary" %}
    {% html_link "Remove" "entity_delete" entity.id class="btn btn-primary" %}
  </div>
</div>
<hr>
<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 input-small" %}</dd>
</dl>
{% endif %}
{% endwith %}
{% endblock %}