X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-mod-admin-full%2Fluasrc%2Fview%2Fadmin_status%2Findex.htm;h=d29a89427687738fca1b2493134ac8c01ecc8f9f;hp=8976e30cba3ef0ee08e8dbdd4c4921b2d8800488;hb=7ae244a26ef516511a5e476dd14ec033501a1d8d;hpb=98d1a09b577a0365ae0a98980d49c6ef5ffe70eb diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm index 8976e30cb..d29a89427 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm @@ -37,10 +37,8 @@ local wan = ntm:get_wannet() local wan6 = ntm:get_wan6net() - local conn_count = tonumber(( - luci.sys.exec("wc -l /proc/net/nf_conntrack") or - luci.sys.exec("wc -l /proc/net/ip_conntrack") or - ""):match("%d+")) or 0 + local conn_count = tonumber( + fs.readfile("/proc/sys/net/netfilter/nf_conntrack_count")) or 0 local conn_max = tonumber(( luci.sys.exec("sysctl net.nf_conntrack_max") or @@ -76,12 +74,14 @@ if wan6 then rv.wan6 = { - ip6addr = wan6:ip6addr(), - gw6addr = wan6:gw6addr(), - dns = wan6:dns6addrs(), - uptime = wan6:uptime(), - ifname = wan6:ifname(), - link = wan6:adminlink() + ip6addr = wan6:ip6addr(), + gw6addr = wan6:gw6addr(), + dns = wan6:dns6addrs(), + ip6prefix = wan6:ip6prefix(), + uptime = wan6:uptime(), + proto = wan6:proto(), + ifname = wan6:ifname(), + link = wan6:adminlink() } end @@ -233,9 +233,34 @@ if (ifc6 && ifc6.ifname && ifc6.proto != 'none') { var s = String.format( - '<%:Address%>: %s
' + + '<%:Type%>: %s%s
', + ifc6.proto, (ifc6.ip6prefix) ? '-pd' : '' + ); + + if (!ifc6.ip6prefix) + { + s += String.format( + '<%:Address%>: %s
', + (ifc6.ip6addr) ? ifc6.ip6addr : '::' + ); + } + else + { + s += String.format( + '<%:Prefix Delegated%>: %s
', + ifc6.ip6prefix + ); + if (ifc6.ip6addr) + { + s += String.format( + '<%:Address%>: %s
', + ifc6.ip6addr + ); + } + } + + s += String.format( '<%:Gateway%>: %s
', - (ifc6.ip6addr) ? ifc6.ip6addr : '::', (ifc6.gw6addr) ? ifc6.gw6addr : '::' );