Commit db8431d6 by Bence Dányi

webui: hide IPv6, if not available

parent 7ca871df
...@@ -163,12 +163,12 @@ ...@@ -163,12 +163,12 @@
{% endif %} {% endif %}
</td> </td>
{% if not i.is_ipv6 %} {% if not i.is_ipv6 %}
<td rowspan="2"> <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 %} {% endif %}
</tr> </tr>
<tr{% if not i.is_ipv6 %} class="faded"{% endif %}> <tr{% if not i.is_ipv6 %} style="display: none"{% 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 %}
......
...@@ -38,22 +38,12 @@ ...@@ -38,22 +38,12 @@
</tr> </tr>
<tr{% if i.is_ipv6 %} class="faded"{% endif %}> <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 }}:{{i.port_v4}}</td>
</tr> </tr>
<tr{% if not i.is_ipv6 %} class="faded"{% endif %}> <tr{% if not i.is_ipv6 %} style="display: none"{% 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 }}:{{ i.port_v6 }}</td>
</tr> </tr>
{% if i.nat %}
<tr>
<th>{% trans "IPv4 Port" %}:</th>
<td>{{ i.port_v4 }}</td>
</tr>
<tr>
<th>{% trans "IPv6 Port" %}:</th>
<td>{{ i.port_v6 }}</td>
</tr>
{% endif %}
<tr> <tr>
<th>{% trans "Username" %}:</th> <th>{% trans "Username" %}:</th>
<td>cloud</td> <td>cloud</td>
......
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