mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2025-04-19 00:45:16 +00:00
display destination port forwarding
This commit is contained in:
parent
c8aedc5437
commit
5fc0a17d09
@ -1,7 +1,7 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block page_custom_head %}
|
{% block page_custom_head %}
|
||||||
<style>
|
<style>
|
||||||
.first-line-container {
|
.first-line-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center; /* Centraliza os itens verticalmente */
|
align-items: center; /* Centraliza os itens verticalmente */
|
||||||
@ -22,12 +22,12 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
{% endblock%}
|
{% endblock%}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="card card-primary card-outline">
|
<div class="card card-primary card-outline">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% include "firewall/firewall_nav_tabs.html" %}
|
{% include "firewall/firewall_nav_tabs.html" %}
|
||||||
<div class="tab-content" id="custom-content-below-tabContent">
|
<div class="tab-content" id="custom-content-below-tabContent">
|
||||||
@ -79,7 +79,13 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ rule.get_protocol_display }}</td>
|
<td>{{ rule.get_protocol_display }}</td>
|
||||||
<td>{{ rule.port }}</td>
|
<td>
|
||||||
|
{% if rule.port_forward %}
|
||||||
|
{{ rule.port_forward }}
|
||||||
|
{% else %}
|
||||||
|
{{ rule.port }}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>ACCEPT</td>
|
<td>ACCEPT</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
@ -99,18 +105,21 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ rule.get_protocol_display }}</td>
|
<td>{{ rule.get_protocol_display }}</td>
|
||||||
<td>{{ rule.port }}</td>
|
<td>
|
||||||
|
{% if rule.port_forward %}
|
||||||
|
{{ rule.port_forward }}
|
||||||
|
{% else %}
|
||||||
|
{{ rule.port }}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>MASQUERADE</td>
|
<td>MASQUERADE</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% for rule in firewall_rule_list %}
|
{% for rule in firewall_rule_list %}
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 1%; white-space: nowrap;">{{ rule.sort_order }}</td>
|
<td style="width: 1%; white-space: nowrap;">{{ rule.sort_order }}</td>
|
||||||
<td style="width: 1%; white-space: nowrap;">{% if rule.description %}<i class="fas fa-info-circle" title="{{ rule.description }}"></i>{% endif %}</td>
|
<td style="width: 1%; white-space: nowrap;">{% if rule.description %}<i class="fas fa-info-circle" title="{{ rule.description }}"></i>{% endif %}</td>
|
||||||
@ -125,7 +134,6 @@
|
|||||||
{% if rule.destination_ip %}{% if rule.not_destination %}<span title="Not destination">!</span> {% endif %}{{ rule.destination_ip }}/{{ rule.destination_netmask }}<br>{% endif%}
|
{% if rule.destination_ip %}{% if rule.not_destination %}<span title="Not destination">!</span> {% endif %}{{ rule.destination_ip }}/{{ rule.destination_netmask }}<br>{% endif%}
|
||||||
{% for peer in rule.destination_peer.all %}{% if rule.not_destination %}<span title="Not destination">!</span> {% endif %}{{ peer }}{% if rule.destination_peer_include_networks %} <span title="Include peer networks">+</span>{% endif %}<br>{% endfor %}
|
{% for peer in rule.destination_peer.all %}{% if rule.not_destination %}<span title="Not destination">!</span> {% endif %}{{ peer }}{% if rule.destination_peer_include_networks %} <span title="Include peer networks">+</span>{% endif %}<br>{% endfor %}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>{{ rule.get_protocol_display|default_if_none:'all' }}</td>
|
<td>{{ rule.get_protocol_display|default_if_none:'all' }}</td>
|
||||||
<td>{{ rule.destination_port|default_if_none:'' }}</td>
|
<td>{{ rule.destination_port|default_if_none:'' }}</td>
|
||||||
<td>
|
<td>
|
||||||
@ -136,9 +144,6 @@
|
|||||||
{% if rule.state_untracked %}{% if rule.not_state %}<span title="Not state">! </span>{% endif %}Untracked<br>{% endif %}
|
{% if rule.state_untracked %}{% if rule.not_state %}<span title="Not state">! </span>{% endif %}Untracked<br>{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ rule.get_rule_action_display }}</td>
|
<td>{{ rule.get_rule_action_display }}</td>
|
||||||
{% comment%}
|
|
||||||
<td>{{ rule. }}</td>
|
|
||||||
{% endcomment %}
|
|
||||||
<td style="width: 1%; white-space: nowrap;">
|
<td style="width: 1%; white-space: nowrap;">
|
||||||
<a href="/firewall/manage_firewall_rule/?uuid={{ rule.uuid }}" ><i class="far fa-edit"></i></a>
|
<a href="/firewall/manage_firewall_rule/?uuid={{ rule.uuid }}" ><i class="far fa-edit"></i></a>
|
||||||
</td>
|
</td>
|
||||||
@ -182,7 +187,6 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -192,18 +196,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block custom_page_scripts %}
|
{% block custom_page_scripts %}
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
document.querySelectorAll('td').forEach(function(td) {
|
document.querySelectorAll('td').forEach(function(td) {
|
||||||
let brCount = (td.innerHTML.match(/<br>/g) || []).length;
|
let brCount = (td.innerHTML.match(/<br>/g) || []).length;
|
||||||
@ -233,6 +231,6 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user