File diff 5c7da7c67a3e → 87d2821ecdfd
conntrackt/templates/conntrackt/entity_detail.html
Show inline comments
 
@@ -4,8 +4,6 @@
 
{% load conntrackt_tags %}
 

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

	
 
{% if entity %}
 
<div class="row">
 
@@ -20,27 +18,88 @@
 
</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" %}
 
    {% html_link "Get Iptables" 'entity_iptables' entity.id class="btn btn-primary" %}
 
  </div>
 
</div>
 

	
 
<hr>
 

	
 
<div class="row">
 

	
 
  <div class="span6">
 
    <div class="well">
 
      <table class="table table-striped">
 
        <tr>
 
          <th colspan="2">General information</th>
 
        </tr>
 
        <tr>
 
          <th>Project</th><td style="width:99%">{% html_link project.name 'project'  project.id  %}</td>
 
        </tr>
 
        <tr>
 
          <th>Location</th><td>{{location}}</td>
 
        </tr>
 
      </table>
 
    </div>
 
  </div>
 

	
 
  <div class="span6">
 
    <div class="well">
 
      <table class="table table-striped">
 
        <tr>
 
          <th style="width:99%">Interfaces</th>
 
        </tr>
 
        <tr>
 
          {% for interface in interfaces %}
 
            <td>{{interface.name}} ({{interface.address}}/{{interface.netmask}})</td>
 
          {% endfor %}
 
        </tr>
 
      </table>
 
    </div>
 
  </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>
 

	
 
<div class="row">
 
  <div class="span6">
 
    <div class="well">
 
      <table class="table table-striped">
 
        <tr>
 
          <th>Incoming communications</th>
 
        </tr>
 
        {% for comm in incoming_communications %}
 
          <tr><td>{{comm.source}} - {{comm.protocol}}: {{comm.port}}</td></tr>
 
        {% endfor %}
 
      </table>
 
    </div>
 
  </div>
 

	
 
  <div class="span6">
 
    <div class="well">
 
      <table class="table table-striped">
 
        <tr>
 
          <th>Outgoing communications</th>
 
        </tr>
 
        {% for comm in outgoing_communications %}
 
          <tr><td>{{comm.destination}} - {{comm.protocol}}: {{comm.port}}</td></tr>
 
        {% endfor %}
 
        <tr>
 
        </tr>
 
      </table>
 
    </div>
 
  </div>
 

	
 
  <div class="span12">
 
    <div>
 
      <p><strong>Iptables rules</strong></p>
 
      <pre>{{ entity_iptables }}</pre>
 
    </div>
 
  </div>
 
  
 
</div>
 
{% endif %}
 
{% endwith %}
 
{% endblock %}