luci-mod-network: put each IPv6 address on a separate line
authorDavid Härdeman <david@hardeman.nu>
Wed, 7 Feb 2024 14:41:48 +0000 (15:41 +0100)
committerPaul Donald <newtwen@gmail.com>
Thu, 8 Feb 2024 13:43:01 +0000 (14:43 +0100)
Right now, when there's active DHCPv6 leases and more than one address per host
(e.g. because ULA is used together with GUA prefixes), the two IPv6 addresses
will be printed on one line (which may or may not get broken up depending on
the length of the addresses, which also looks inconsistent).

Putting each address on a separate line makes it much easier to read the
addresses (IMHO).

Signed-off-by: David Härdeman <david@hardeman.nu>
(cherry picked from commit 9116a93d4311f541efa026f9eb3309a5f7554fd4)

modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js
modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js

index 4ead80e8f2d91e7a62e1d7bb8f0c1bb42353cc42..882ea71550f4b057307bb22855649cf3cd65acdd 100644 (file)
@@ -1035,7 +1035,7 @@ return view.extend({
 
                                                                return [
                                                                        host || '-',
-                                                                       lease.ip6addrs ? lease.ip6addrs.join(' ') : lease.ip6addr,
+                                                                       lease.ip6addrs ? lease.ip6addrs.join('<br />') : lease.ip6addr,
                                                                        lease.duid,
                                                                        exp
                                                                ];
index 4c5291642363010cd61954ab683638943669d6a9..0894d3d4d174f508953adb494541e41b102c2719 100644 (file)
@@ -161,7 +161,7 @@ return baseclass.extend({
 
                        rows = [
                                host || '-',
-                               lease.ip6addrs ? lease.ip6addrs.join(' ') : lease.ip6addr,
+                               lease.ip6addrs ? lease.ip6addrs.join('<br />') : lease.ip6addr,
                                lease.duid,
                                exp
                        ];