Files
@ 2a0c8cb4797c
Branch filter:
Location: conntrackt/conntrackt/templates/conntrackt/entity_detail.html - annotation
2a0c8cb4797c
2.5 KiB
text/html
CONNT-5: Added custom model form for Interface. Applied small improvement to EntityForm for styling. Implemented adding interfaces to entities from the entity details page. Updated representation of interfaces on entity details page. Updated view tests for the new functionality. Minor fix to EntityView.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | 0e5abbd2d3d6 ad556f8e81bd 202776b43053 90fac7c6abb9 ad556f8e81bd ad556f8e81bd 202776b43053 ad556f8e81bd b9fabc69b505 b9fabc69b505 b9fabc69b505 5deeefd8d0fc 5deeefd8d0fc b9fabc69b505 b9fabc69b505 5deeefd8d0fc 5deeefd8d0fc 5deeefd8d0fc 5deeefd8d0fc 5deeefd8d0fc 87d2821ecdfd 5deeefd8d0fc 5deeefd8d0fc 5deeefd8d0fc b9fabc69b505 87d2821ecdfd 2a0c8cb4797c 2a0c8cb4797c 2a0c8cb4797c 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 2a0c8cb4797c 2a0c8cb4797c 87d2821ecdfd 2a0c8cb4797c 2a0c8cb4797c 87d2821ecdfd 87d2821ecdfd b9fabc69b505 b9fabc69b505 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd 87d2821ecdfd ad556f8e81bd 202776b43053 202776b43053 | {% extends "conntrackt/base.html" %}
{# For html_link. #}
{% load conntrackt_tags %}
{% block content %}
{% 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" %}
{% 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 %}
</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>
{% for interface in interfaces %}
<tr>
<td>{{interface.name}} ({{interface.address}}/{{interface.netmask}})</td>
</tr>
{% endfor %}
</table>
</div>
</div>
</div>
<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 %}
{% endblock %}
|