luci-mod-admin-full: interface status page / clarify address display
authorHannu Nyman <hannu.nyman@iki.fi>
Fri, 18 Dec 2015 18:38:08 +0000 (20:38 +0200)
committerHannu Nyman <hannu.nyman@iki.fi>
Fri, 18 Dec 2015 18:38:08 +0000 (20:38 +0200)
Copy the changes made by f8d0ba00b2ff27dc9e2f10712bc343ae655fbdf9
also to the interface details pages in order to clarify display of
multiple addresses.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm

index 94d9e88117cdd98315436f959f39916448205595..8c3b1abcc756eceede506f8ed3b34d69b4fe34c5 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;