diff --git a/plinth/modules/networks/networks.py b/plinth/modules/networks/networks.py
index e01854814..e6a522528 100644
--- a/plinth/modules/networks/networks.py
+++ b/plinth/modules/networks/networks.py
@@ -57,6 +57,82 @@ def index(request):
'connections': connections})
+def show(request, uuid):
+ """Serve connection information."""
+ try:
+ connection = network.get_connection(uuid)
+ except network.ConnectionNotFound:
+ messages.error(request, _('Cannot show connection: '
+ 'Connection not found.'))
+ return redirect(reverse_lazy('networks:index'))
+
+ name = connection.get_interface_name()
+ connectiontype = connection.get_connection_type()
+ settings_ipv4 = connection.get_setting_ip4_config()
+
+ mac = network.get_mac_from_device(name)
+ interface = connection.get_interface_name()
+ if connectiontype == '802-11-wireless':
+ settings_wireless = connection.get_setting_wireless()
+ ssid = settings_wireless.get_ssid().get_data()
+ rate = network.get_wifi_rate(interface, ssid)
+ channel = network.get_wifi_channel(interface, ssid)
+ strength = network.get_wifi_signal(interface, ssid)
+ linkstate = True
+ else:
+ ssid = "None"
+ rate = 0
+ channel = 0
+ linkstate = network.get_linkstate_from_device(name)
+ strength = 0
+
+ ip = network.get_all_ip_from_device(name)
+ ip6 = network.get_all_ip6_from_device(name)
+ dns = network.get_namesever_from_device(name)
+ dns6 = network.get_namesever6_from_device(name)
+ gateway = network.get_gateway_from_device(name)
+ gateway6 = network.get_gateway6_from_device(name)
+ method = settings_ipv4.get_method()
+
+ zone = connection.get_setting_connection().get_zone()
+ active = network.connection_is_active(uuid)
+
+ if network.get_primary_connection().get_id() == connection.get_id():
+ primary = True
+ else:
+ primary = False
+
+ if not ip:
+ ip.append("0.0.0.0/0")
+
+ if not ip6:
+ ip6.append("::0/0")
+
+ return TemplateResponse(request, 'connection_show.html',
+ {'title': _('Show Connection information'),
+ 'ip': ip,
+ 'ip6': ip6,
+ 'gateway': gateway,
+ 'gateway6': gateway6,
+ 'dns': dns,
+ 'dns6': dns6,
+ 'interface': interface,
+ 'mac': mac,
+ 'linkstate': linkstate,
+ 'zone': zone,
+ 'primary': primary,
+ 'subsubmenu': subsubmenu,
+ 'method': method,
+ 'connectiontype': connectiontype,
+ 'ssid': ssid,
+ 'strength': strength,
+ 'rate': rate,
+ 'channel': channel,
+ 'active': active,
+ 'uuid': uuid,
+ 'name': name})
+
+
def edit(request, uuid):
"""Serve connection editing form."""
try:
diff --git a/plinth/modules/networks/templates/connection_show.html b/plinth/modules/networks/templates/connection_show.html
new file mode 100644
index 000000000..f657a30da
--- /dev/null
+++ b/plinth/modules/networks/templates/connection_show.html
@@ -0,0 +1,186 @@
+{% extends "base.html" %}
+{% comment %}
+#
+# This file is part of Plinth.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see