Files
@ 5c7da7c67a3e
Branch filter:
Location: conntrackt/conntrackt/templates/conntrackt/entity_detail.html - annotation
5c7da7c67a3e
1.5 KiB
text/html
Noticket: Added a check for existing communications when attempting to move entity to a different project. Includes test of new functionality.
0e5abbd2d3d6 ad556f8e81bd 202776b43053 90fac7c6abb9 ad556f8e81bd ad556f8e81bd 202776b43053 ad556f8e81bd 202776b43053 ad556f8e81bd b9fabc69b505 b9fabc69b505 b9fabc69b505 5deeefd8d0fc 5deeefd8d0fc b9fabc69b505 b9fabc69b505 5deeefd8d0fc 5deeefd8d0fc 5deeefd8d0fc 5deeefd8d0fc 5deeefd8d0fc 5deeefd8d0fc 5deeefd8d0fc 5deeefd8d0fc b9fabc69b505 b9fabc69b505 b9fabc69b505 b9fabc69b505 ad556f8e81bd 202776b43053 df07ff9dfd85 202776b43053 202776b43053 202776b43053 202776b43053 202776b43053 202776b43053 202776b43053 ad556f8e81bd 0d7adadf08a3 ad556f8e81bd ad556f8e81bd ad556f8e81bd 202776b43053 202776b43053 | {% 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 %}
|