X-Git-Url: https://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=2abb370762342ae98c89b1beaa08447f6fa374b0;hb=7ae244a26ef516511a5e476dd14ec033501a1d8d;hpb=ac9b31ca462b5662e98a0ac6b57fb49c4c4e32de
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 2abb37076..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 : '::'
);
@@ -303,11 +328,11 @@
info.dsl.annex_s,
info.dsl.profile_s,
info.dsl.data_rate_down_s, info.dsl.data_rate_up_s,
- info.dsl.max_data_rate_down_s, info.dsl.max_data_rate_up_s,
+ info.dsl.max_data_rate_down_s, info.dsl.max_data_rate_up_s,
info.dsl.latency_num_down, info.dsl.latency_num_up,
info.dsl.line_attenuation_down, info.dsl.line_attenuation_up,
- info.dsl.noise_margin_down, info.dsl.noise_margin_up,
info.dsl.signal_attenuation_down, info.dsl.signal_attenuation_up,
+ info.dsl.noise_margin_down, info.dsl.noise_margin_up,
info.dsl.actatp_down, info.dsl.actatp_up,
info.dsl.errors_fec_near, info.dsl.errors_fec_far,
info.dsl.errors_es_near, info.dsl.errors_es_far,
@@ -341,7 +366,9 @@
{
var timestr;
- if (info.leases[i].expires <= 0)
+ if (info.leases[i].expires === false)
+ timestr = '<%:unlimited%>';
+ else if (info.leases[i].expires <= 0)
timestr = '<%:expired%>';
else
timestr = String.format('%t', info.leases[i].expires);
@@ -379,7 +406,9 @@
{
var timestr;
- if (info.leases6[i].expires <= 0)
+ if (info.leases6[i].expires === false)
+ timestr = '<%:unlimited%>';
+ else if (info.leases6[i].expires <= 0)
timestr = '<%:expired%>';
else
timestr = String.format('%t', info.leases6[i].expires);
@@ -471,7 +500,7 @@
'<%:Bitrate%>: %s <%:Mbit/s%>
',
icon, net.signal, net.noise,
net.quality,
- net.link, net.ssid,
+ net.link, net.ssid || '?',
net.mode,
net.channel, net.frequency,
net.bitrate || '?'
@@ -482,7 +511,7 @@
s += String.format(
'<%:BSSID%>: %s
' +
'<%:Encryption%>: %s',
- net.bssid,
+ net.bssid || '?',
net.encryption
);
}