2017-09-29 20:28:48 +00:00
|
|
|
{% extends "machines/sidebar.html" %}
|
|
|
|
|
|
|
|
{% load bootstrap3 %}
|
|
|
|
|
|
|
|
{% block title %}Configuration de ports{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<h2>Liste des configurations de ports</h2>
|
2017-10-01 15:19:42 +00:00
|
|
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-portlist' %}"><i class="glyphicon glyphicon-plus"></i>Ajouter une configuration</a>
|
2017-09-29 20:28:48 +00:00
|
|
|
<table class="table table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Nom</th>
|
2017-10-01 09:39:39 +00:00
|
|
|
<th>TCP (entrée)</th>
|
|
|
|
<th>TCP (sortie)</th>
|
|
|
|
<th>UDP (entrée)</th>
|
|
|
|
<th>UDP (sortie)</th>
|
2017-10-01 23:52:14 +00:00
|
|
|
<th>Machines</th>
|
2017-09-29 20:28:48 +00:00
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
{% for pl in port_list %}
|
|
|
|
<tr>
|
|
|
|
<td>{{pl.name}}</td>
|
2017-10-01 09:39:39 +00:00
|
|
|
<td>{% for p in pl.tcp_ports_in %}{{p.show_port}}, {%endfor%}</td>
|
|
|
|
<td>{% for p in pl.tcp_ports_out %}{{p.show_port}}, {%endfor%}</td>
|
|
|
|
<td>{% for p in pl.udp_ports_in %}{{p.show_port}}, {%endfor%}</td>
|
|
|
|
<td>{% for p in pl.udp_ports_out %}{{p.show_port}}, {%endfor%}</td>
|
2017-10-01 23:52:14 +00:00
|
|
|
<td>
|
|
|
|
{% if pl.interface_set.all %}
|
|
|
|
<div class="dropdown">
|
|
|
|
<button class="btn btn-default dropdown-toggle" type="button" id="editioninterface" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu" aria-labelledby="editioninterface">
|
|
|
|
{% for interface in pl.interface_set.all %}
|
|
|
|
<li>
|
|
|
|
<a href="{% url 'users:profil' userid=interface.machine.user.id %}">
|
|
|
|
{{ interface }}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2017-09-29 20:28:48 +00:00
|
|
|
<td class="text-right">
|
2017-10-01 15:09:00 +00:00
|
|
|
{% include 'buttons/suppr.html' with href='machines:del-portlist' id=pl.id %}
|
2017-09-30 08:04:18 +00:00
|
|
|
{% include 'buttons/edit.html' with href='machines:edit-portlist' id=pl.id %}
|
2017-09-29 20:28:48 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{%endfor%}
|
|
|
|
</table>
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
|
|
|
|
{% endblock %}
|