From ca13b7bd93268e78cbad38164ff28ef85f5f872d Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 23 May 2022 13:00:59 -0700 Subject: [PATCH] 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 Reviewed-by: James Valleroy --- plinth/modules/firewall/components.py | 1 + plinth/templates/port-forwarding-info.html | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plinth/modules/firewall/components.py b/plinth/modules/firewall/components.py index d94cd8e4c..7514447d6 100644 --- a/plinth/modules/firewall/components.py +++ b/plinth/modules/firewall/components.py @@ -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] }) diff --git a/plinth/templates/port-forwarding-info.html b/plinth/templates/port-forwarding-info.html index a051e716e..6de46add7 100644 --- a/plinth/templates/port-forwarding-info.html +++ b/plinth/templates/port-forwarding-info.html @@ -30,10 +30,11 @@ {{ service_name }}: {% endblocktrans %} -
+
+ @@ -42,6 +43,7 @@ {% for port in port_forwarding_info.ports %} +
{% trans "Service Name" %} {% trans "Protocol" %} {% trans "From Router/WAN Ports" %} {% blocktrans %}To {{box_name}} Ports{% endblocktrans %}
{{ port.name }} {{ port.protocol }} {{ port.ports }} {{ port.ports }}