diff --git a/conntrackt/templates/conntrackt/entity_detail.html b/conntrackt/templates/conntrackt/entity_detail.html --- a/conntrackt/templates/conntrackt/entity_detail.html +++ b/conntrackt/templates/conntrackt/entity_detail.html @@ -24,9 +24,6 @@ {% 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" %} - {% with entity_id=entity.id|slugify %} - {% html_link "Add interface" "interface_create" class="btn btn-primary" get="entity="|add:entity_id %} - {% endwith %} @@ -35,12 +32,10 @@
+

General information

- - - @@ -51,56 +46,86 @@
+

Interfaces

+ {% if interfaces %}
General information
Project{% html_link project.name 'project' project.id %}
- - - {% for interface in interfaces %} - - - - - + + + + + {% endfor %}
Interfaces
{{interface.name}} ({{interface.address}}/{{interface.netmask}}){% html_link '' 'interface_update' interface.id class="btn btn-link" %}{% html_link '' 'interface_delete' interface.id class="btn btn-link" %}

{{interface.name}} ({{interface.address}}/{{interface.netmask}})

{% html_link '' 'interface_update' interface.id class="btn btn-link" %}{% html_link '' 'interface_delete' interface.id class="btn btn-link" %}
+ {% else %} +

No interfaces are defined for this entity.

+ {% endif %} +
+ {% with entity_id=entity.id|slugify %} + {% html_link "Add interface" "interface_create" class="btn btn-primary btn-mini" get="entity="|add:entity_id %} + {% endwith %} +
+

Incoming communications

+ {% if incoming_communications %} + {% for comm in incoming_communications %} - + + + - {% for comm in incoming_communications %} - {% endfor %}
Incoming communications{% html_link comm.source_representation "entity" comm.source.entity.id class="btn btn-link" %}{% html_link '' 'communication_update' comm.id class="btn btn-link" %}{% html_link '' 'communication_delete' comm.id class="btn btn-link" %}
{{comm.source}} - {{comm.protocol}}: {{comm.port}}
+ {% else %} +

No incoming communications towards this entity.

+ {% endif %} +
+ {% with entity_id=entity.id|slugify %} + {% html_link "Add communication" "communication_create" class="btn btn-primary btn-mini" get="to_entity="|add:entity_id %} + {% endwith %} +
+

Outgoing communications

+ {% if outgoing_communications %} - - - {% for comm in outgoing_communications %} - + + + + + {% endfor %} - -
Outgoing communications
{{comm.destination}} - {{comm.protocol}}: {{comm.port}}
{% html_link comm.destination_representation "entity" comm.destination.entity.id class="btn btn-link" %}{% html_link '' 'communication_update' comm.id class="btn btn-link" %}{% html_link '' 'communication_delete' comm.id class="btn btn-link" %}
+ {% else %} +

No outgoing communications from this entity.

+ {% endif %} +
+ {% with entity_id=entity.id|slugify %} + {% html_link "Add communication" "communication_create" class="btn btn-primary btn-mini" get="from_entity="|add:entity_id %} + {% endwith %} +
-
-

Iptables rules

+

Iptables rules

+
{{ entity_iptables }}
+
+ {% html_link "Download" 'entity_iptables' entity.id class="btn btn-primary" %} +