From: Hannu Nyman Date: Fri, 18 Dec 2015 17:19:36 +0000 (+0200) Subject: for-15-05: luci-mod-admin-full: update IPv4/IPv6 list views X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b7fe44ab0b98168f4e36b87fc0cf22760425b636;p=oweals%2Fluci.git for-15-05: luci-mod-admin-full: update IPv4/IPv6 list views Clarify address presentation on the Network/Interfaces page by backporting f8d0ba00b2ff27dc9e2f10712bc343ae655fbdf9 : 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: Hannu Nyman --- diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm index 1de349856..682edc448 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm @@ -139,32 +139,22 @@ if (ifc.ipaddrs && ifc.ipaddrs.length) { - html += '<%:IPv4%>: '; - for (var i = 0; i < ifc.ipaddrs.length; i++) html += String.format( - '%s%s/%d', - i ? ', ' : '', + '<%:IPv4%>: %s/%d
', ifc.ipaddrs[i].addr, ifc.ipaddrs[i].prefix ); - - html += '
'; } if (ifc.ip6addrs && ifc.ip6addrs.length) { - html += '<%:IPv6%>: '; - for (var i = 0; i < ifc.ip6addrs.length; i++) html += String.format( - '%s%s/%d', - i ? ', ' : '', - ifc.ip6addrs[i].addr.toUpperCase(), + '<%:IPv6%>: %s/%d
', + ifc.ip6addrs[i].addr, ifc.ip6addrs[i].prefix ); - - html += '
'; } d.innerHTML = html;