Commit 7ca871df by Bence Dányi

webui: fade unused IP protocol

parent 4eacfcf2
...@@ -560,6 +560,10 @@ ...@@ -560,6 +560,10 @@
.content { .content {
padding: 15px; padding: 15px;
} }
.faded {
color: #666;
font-size: 0.8em;
}
} }
table { table {
......
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
<th colspan="2">{% trans "Access" %}</th> <th colspan="2">{% trans "Access" %}</th>
</tr> </tr>
{% for port in ports %} {% for port in ports %}
<tr> <tr{% if i.is_ipv6 %} class="faded"{% endif %}>
<td>{{port.private}}/{{port.proto}}</td> <td>{{port.private}}/{{port.proto}}</td>
<td style="white-space: nowrap;"> <td style="white-space: nowrap;">
{% if port.private == 80 or port.private == 8080 or port.private == 8000 %} {% if port.private == 80 or port.private == 8080 or port.private == 8000 %}
...@@ -162,11 +162,13 @@ ...@@ -162,11 +162,13 @@
{{port.ipv4.host}}:{{port.ipv4.port}} {{port.ipv4.host}}:{{port.ipv4.port}}
{% endif %} {% endif %}
</td> </td>
<td> {% if not i.is_ipv6 %}
<td rowspan="2">
<a href="{% url one.views.vm_port_del i.id port.proto port.private %}">{% trans "Delete" %}</a> <a href="{% url one.views.vm_port_del i.id port.proto port.private %}">{% trans "Delete" %}</a>
</td> </td>
{% endif %}
</tr> </tr>
<tr> <tr{% if not i.is_ipv6 %} class="faded"{% endif %}>
<td>{{port.private}}/{{port.proto}}6</td> <td>{{port.private}}/{{port.proto}}6</td>
<td style="white-space: nowrap;"> <td style="white-space: nowrap;">
{% if port.private == 80 or port.private == 8080 or port.private == 8000 %} {% if port.private == 80 or port.private == 8080 or port.private == 8000 %}
...@@ -181,9 +183,11 @@ ...@@ -181,9 +183,11 @@
{{port.ipv6.host}}:{{port.ipv6.port}} {{port.ipv6.host}}:{{port.ipv6.port}}
{% endif %} {% endif %}
</td> </td>
{% if i.is_ipv6 %}
<td> <td>
<a href="{% url one.views.vm_port_del i.id port.proto port.private %}">{% trans "Delete" %}</a> <a href="{% url one.views.vm_port_del i.id port.proto port.private %}">{% trans "Delete" %}</a>
</td> </td>
{% endif %}
</tr> </tr>
{% endfor %} {% endfor %}
<tr> <tr>
......
...@@ -36,11 +36,11 @@ ...@@ -36,11 +36,11 @@
{{i.template.access_type|upper}} {{i.template.access_type|upper}}
</td> </td>
</tr> </tr>
<tr> <tr{% if i.is_ipv6 %} class="faded"{% endif %}>
<th>{% trans "IPv4 Host" %}{% if i.is_ipv6 %} ({% trans "You are using IPv6" %}){% endif %}:</th> <th>{% trans "IPv4 Host" %}{% if i.is_ipv6 %} ({% trans "You are using IPv6" %}){% endif %}:</th>
<td>{{ i.hostname_v4 }}</td> <td>{{ i.hostname_v4 }}</td>
</tr> </tr>
<tr> <tr{% if not i.is_ipv6 %} class="faded"{% endif %}>
<th>{% trans "IPv6 Host" %}{% if not i.is_ipv6 %} ({% trans "You are using IPv4" %}){% endif %}:</th> <th>{% trans "IPv6 Host" %}{% if not i.is_ipv6 %} ({% trans "You are using IPv4" %}){% endif %}:</th>
<td>{{ i.hostname_v6 }}</td> <td>{{ i.hostname_v6 }}</td>
</tr> </tr>
......
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