luci-mod-admin-full: update IPv4/IPv6 list views 567/head
authorAlexander Logger <intagger@gmail.com>
Tue, 8 Dec 2015 18:20:11 +0000 (21:20 +0300)
committerAlexander Logger <intagger@gmail.com>
Tue, 8 Dec 2015 18:20:11 +0000 (21:20 +0300)
For better view of 'Interface Overview' IPv4/IPv6 addresses for
interfaces should be displayed as lists, but not as comma separated
strings.

Signed-off-by: Alexander Logger <intagger@gmail.com>
modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm

index b222cbca18473807882a71e74779a9a916c7b84c..646d931f37eeb2b04efd28a8994aa81e2d33a77c 100644 (file)
 
                                                if (ifc.ipaddrs && ifc.ipaddrs.length)
                                                {
-                                                       html += '<strong><%:IPv4%>: </strong>';
-
                                                        for (var i = 0; i < ifc.ipaddrs.length; i++)
                                                                html += String.format(
-                                                                       '%s%s',
-                                                                       i ? ', ' : '',
+                                                                       '<strong><%:IPv4%>:</strong> %s<br />',
                                                                        ifc.ipaddrs[i]
                                                                );
-
-                                                       html += '<br />';
                                                }
 
                                                if (ifc.ip6addrs && ifc.ip6addrs.length)
                                                {
-                                                       html += '<strong><%:IPv6%>: </strong>';
-
                                                        for (var i = 0; i < ifc.ip6addrs.length; i++)
                                                                html += String.format(
-                                                                       '%s%s',
-                                                                       i ? ', ' : '',
-                                                                       ifc.ip6addrs[i].toUpperCase()
+                                                                       '<strong><%:IPv6%>:</strong> %s<br />',
+                                                                       ifc.ip6addrs[i]
                                                                );
-
-                                                       html += '<br />';
                                                }
 
                                                d.innerHTML = html;