Commit efdebdff by Kálmán Viktor

network: enhance host edit page

- fix some bugs
- add vlans to vlan groups
- add proto
parent 8b236652
{% load i18n %} {% load i18n %}
{% load l10n %} {% load l10n %}
{# <span style="color: #FF0000;">[{{ record.r_type }}]</span> #} {% if record.direction == "in" %}
{% if record.direction == "1" %}
{{ record.foreign_network }} {{ record.foreign_network }}
[{% for v in record.foreign_network.vlans.all %}
{{ v.name }}{% if not forloop.last %},{% endif %}
{% endfor %}]
{% else %} {% else %}
{% if record.r_type == "host" %} {% if record.r_type == "host" %}
{{ record.host.get_fqdn }} {{ record.host.get_fqdn }}
...@@ -11,10 +13,10 @@ ...@@ -11,10 +13,10 @@
{{ record.r_type }} {{ record.r_type }}
{% endif %} {% endif %}
{% endif %} {% endif %}
{#<span style="color: #0000FF;"> ▸ </span>#}
<i class="fa fa-arrow-right"></i> <i class="fa fa-arrow-right"></i>
{% if record.direction == "0" %}
{% if record.direction == "out" %}
{{ record.foreign_network }} {{ record.foreign_network }}
{% else %} {% else %}
{% if record.r_type == "host" %} {% if record.r_type == "host" %}
...@@ -33,6 +35,11 @@ ...@@ -33,6 +35,11 @@
{% if record.nat %} {% if record.nat %}
<span class="label label-success">NAT <span class="label label-success">NAT
[ {{ record.dport }} <i class="fa fa-arrow-right"></i> [
{{record.nat_external_port}} ]</span> {{record.nat_external_port}}
<i class="fa fa-arrow-right"></i>
{{ record.dport }}
]
{{ record.proto|upper }}
</span>
{% endif %} {% endif %}
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-7"> <div class="col-md-6">
{% crispy form %} {% crispy form %}
</div> </div>
<div class="col-sm-5"> <div class="col-md-6">
<div class="page-header"> <div class="page-header">
<a href="{% url "network.rule_create" %}?host={{ host_pk }}" class="btn btn-success pull-right btn-xs"><i class="fa fa-plus-circle"></i> {% trans "Add new rule" %}</a> <a href="{% url "network.rule_create" %}?host={{ host_pk }}" class="btn btn-success pull-right btn-xs"><i class="fa fa-plus-circle"></i> {% trans "Add new rule" %}</a>
<h3>{% trans "Rules" %}</h3> <h3>{% trans "Rules" %}</h3>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment