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