Changeset - 202776b43053
[Not reviewed]
default
0 1 0
Branko Majic (branko) - 11 years ago 2013-03-16 18:21:10
branko@majic.rs
Fixed the listing of incoming connections (destination was displayed instead of source). Switched to using non-styled lists for incoming/outgoing connections.
1 file changed with 15 insertions and 11 deletions:
0 comments (0 inline, 0 general)
conntrackt/templates/conntrackt/entity_detail.html
Show inline comments
 
{% extends "conntrackt/template.html" %}
 

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

	
 
{% 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>{% html_link location.name 'location' location.id %}</dd>
 
<dt>Incoming communications</dt><dd><ul>{% for interface in entity.interface_set.all %}
 
{% for communication in interface.destination_set.all %}
 
<li>{{communication.destination}} - {{communication.protocol}}: {{communication.port}}</li>
 
  <dt>Project</dt><dd>{% html_link project.name 'project'  project.id  %}</dd>
 
  <dt>Location</dt><dd>{% html_link location.name 'location' location.id %}</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>Outgoing communications</dt><dd><ul>{% 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>{% include "conntrackt/entity_iptables.html" with entity=entity %}</pre>{% html_link 'Download' 'entity_iptables' entity.id class="btn btn-primary" %}</dd>
 
      <dt>iptables rules</dt><dd><pre>{% include "conntrackt/entity_iptables.html" with entity=entity %}</pre>{% html_link 'Download' 'entity_iptables' entity.id class="btn btn-primary" %}</dd>
 
</dl>
 
{% endif %}
 
{% endwith %}
 
{% endblock %}
 
\ No newline at end of file
 
{% endblock %}
 

	
0 comments (0 inline, 0 general)