X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fadmin-full%2Fluasrc%2Fview%2Fadmin_status%2Findex.htm;h=cfeb91ac7ae342699b6efb20f9ecd55dbefb3c24;hp=98b6592e1cff67cad22da07875ac5d73449fe25d;hb=2aad24cec13cbc4765cbbc5502832184713b823f;hpb=8fa1e36b3e9a0691aca635ed39488edc88753845;ds=inline
diff --git a/modules/admin-full/luasrc/view/admin_status/index.htm b/modules/admin-full/luasrc/view/admin_status/index.htm
index 98b6592e1..cfeb91ac7 100644
--- a/modules/admin-full/luasrc/view/admin_status/index.htm
+++ b/modules/admin-full/luasrc/view/admin_status/index.htm
@@ -24,6 +24,7 @@ You may obtain a copy of the License at
if swaptotal > 0 then
has_swap = 1
end
+ local has_dsl = luci.fs.stat("/etc/init.d/dsl_control")
if luci.http.formvalue("status") == "1" then
local ntm = require "luci.model.network".init()
@@ -83,6 +84,12 @@ You may obtain a copy of the License at
}
end
+ if has_dsl then
+ local dsl_stat = luci.sys.exec("/etc/init.d/dsl_control lucistat")
+ local dsl_func = loadstring(dsl_stat)
+ rv.dsl = dsl_func()
+ end
+
luci.http.prepare_content("application/json")
luci.http.write_json(rv)
@@ -217,6 +224,30 @@ You may obtain a copy of the License at
}
<% end %>
+ <% if has_dsl then %>
+ var dsl_i = document.getElementById('dsl_i');
+ var dsl_s = document.getElementById('dsl_s');
+
+ var s = String.format(
+ '<%:Status%>: %s
' +
+ '<%:Line State%>: %s [0x%x]
' +
+ '<%:Line Speed%>: %s/s / %s/s
' +
+ '<%:Line Attenuation%>: %s dB / %s dB
' +
+ '<%:Noise Margin%>: %s dB / %s dB
',
+ info.dsl.line_state, info.dsl.line_state_detail,
+ info.dsl.line_state_num,
+ info.dsl.data_rate_down_s, info.dsl.data_rate_up_s,
+ info.dsl.line_attenuation_down, info.dsl.line_attenuation_up,
+ info.dsl.noise_margin_down, info.dsl.noise_margin_up
+ );
+
+ dsl_s.innerHTML = String.format('%s', s);
+ dsl_i.innerHTML = String.format(
+ '' +
+ '
ADSL'
+ );
+ <% end %>
+
<% if has_dhcp then %>
var ls = document.getElementById('lease_status_table');
if (ls)
@@ -621,6 +652,20 @@ You may obtain a copy of the License at
<% end %>
+<% if has_dsl then %>
+