firewall: Show service name in port forwarding info table

- Also add CSS class for the table to aide functional tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2022-05-23 13:00:59 -07:00 committed by James Valleroy
parent 74a6042ed8
commit ca13b7bd93
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 4 additions and 1 deletions

View File

@ -173,6 +173,7 @@ def get_port_forwarding_info(app_):
for detail in port['details']:
info['ports'].append({
'name': port['name'],
'protocol': detail[1].upper(),
'ports': detail[0]
})

View File

@ -30,10 +30,11 @@
{{ service_name }}:
{% endblocktrans %}
<div class="table-responsive">
<div class="table-responsive table-port-forwarding-info">
<table class="table">
<thead>
<tr>
<th>{% trans "Service Name" %}</th>
<th>{% trans "Protocol" %}</th>
<th>{% trans "From Router/WAN Ports" %}</th>
<th>{% blocktrans %}To {{box_name}} Ports{% endblocktrans %}</th>
@ -42,6 +43,7 @@
<tbody>
{% for port in port_forwarding_info.ports %}
<tr>
<td>{{ port.name }}</td>
<td>{{ port.protocol }}</td>
<td>{{ port.ports }}</td>
<td>{{ port.ports }}</td>