mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-23 03:43:12 +00:00
Ouverture de port avec warning si ipv4
This commit is contained in:
parent
b399502bda
commit
02dd3594be
2 changed files with 1 additions and 4 deletions
|
@ -96,13 +96,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<i class="glyphicon glyphicon-edit"></i> Gerer les alias
|
||||
</a>
|
||||
</li>
|
||||
{% if interface.may_have_port_open %}
|
||||
<li>
|
||||
<a href="{% url 'machines:port-config' interface.id%}">
|
||||
<i class="glyphicon glyphicon-edit"></i> Gerer la configuration des ports
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="{% url 'machines:history' 'interface' interface.id %}">
|
||||
<i class="glyphicon glyphicon-time"></i> Historique
|
||||
|
|
|
@ -1002,8 +1002,7 @@ def configure_ports(request, pk):
|
|||
messages.error(request, u"Interface inexistante" )
|
||||
return redirect("/machines")
|
||||
if not interface_instance.may_have_port_open():
|
||||
messages.error(request, "L'ip de cette interface n'est pas publique ou non assignée")
|
||||
return redirect("/machines")
|
||||
messages.error(request, "Attention, l'ipv4 n'est pas publique, l'ouverture n'aura pas d'effet en v4")
|
||||
interface = EditOuverturePortConfigForm(request.POST or None, instance=interface_instance)
|
||||
if interface.is_valid():
|
||||
interface.save()
|
||||
|
|
Loading…
Reference in a new issue