summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full/luasrc/view
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/view')
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm10
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm16
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm5
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm2
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm62
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm10
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_system/upgrade.htm4
7 files changed, 82 insertions, 27 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm
index 685082a335..f4adb26069 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm
@@ -9,6 +9,10 @@
local fs = require "nixio.fs"
local has_ping6 = fs.access("/bin/ping6") or fs.access("/usr/bin/ping6")
local has_traceroute6 = fs.access("/usr/bin/traceroute6")
+
+local dns_host = luci.config.diag and luci.config.diag.dns or "dev.openwrt.org"
+local ping_host = luci.config.diag and luci.config.diag.ping or "dev.openwrt.org"
+local route_host = luci.config.diag and luci.config.diag.route or "dev.openwrt.org"
%>
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
@@ -63,7 +67,7 @@ local has_traceroute6 = fs.access("/usr/bin/traceroute6")
<br />
<div style="width:30%; float:left">
- <input style="margin: 5px 0" type="text" value="dev.openwrt.org" name="ping" /><br />
+ <input style="margin: 5px 0" type="text" value="<%=ping_host%>" name="ping" /><br />
<% if has_ping6 then %>
<select name="ping_proto" style="width:auto">
<option value="" selected="selected"><%:IPv4%></option>
@@ -76,7 +80,7 @@ local has_traceroute6 = fs.access("/usr/bin/traceroute6")
</div>
<div style="width:33%; float:left">
- <input style="margin: 5px 0" type="text" value="dev.openwrt.org" name="traceroute" /><br />
+ <input style="margin: 5px 0" type="text" value="<%=route_host%>" name="traceroute" /><br />
<% if has_traceroute6 then %>
<select name="traceroute_proto" style="width:auto">
<option value="" selected="selected"><%:IPv4%></option>
@@ -93,7 +97,7 @@ local has_traceroute6 = fs.access("/usr/bin/traceroute6")
</div>
<div style="width:33%; float:left;">
- <input style="margin: 5px 0" type="text" value="dev.openwrt.org" name="nslookup" /><br />
+ <input style="margin: 5px 0" type="text" value="<%=dns_host%>" name="nslookup" /><br />
<input type="button" value="<%:Nslookup%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.nslookup)" />
</div>
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm
index f7787dd1ea..b4baedff28 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm
@@ -27,14 +27,12 @@
{
var timestr;
- if (st[0][i].expires <= 0)
- {
+ if (st[0][i].expires === false)
+ timestr = '<em><%:unlimited%></em>';
+ else if (st[0][i].expires <= 0)
timestr = '<em><%:expired%></em>';
- }
else
- {
timestr = String.format('%t', st[0][i].expires);
- }
var tr = tb.insertRow(-1);
tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1);
@@ -69,14 +67,12 @@
{
var timestr;
- if (st[1][i].expires <= 0)
- {
+ if (st[1][i].expires === false)
+ timestr = '<em><%:unlimited%></em>';
+ else if (st[1][i].expires <= 0)
timestr = '<em><%:expired%></em>';
- }
else
- {
timestr = String.format('%t', st[1][i].expires);
- }
var tr = tb6.insertRow(-1);
tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1);
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm
index 53c35ae59c..96fbffdb02 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm
@@ -15,7 +15,10 @@
for (var j = 0; j < ports.length; j++)
{
- var th = th0.parentNode.parentNode.childNodes[j+1];
+ var th = document.getElementById('portstatus-' + switches[i] + '-' + j);
+
+ if (!th)
+ continue;
if (ports[j].link)
{
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm
index 1df6b28846..9c351d3933 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm
@@ -427,7 +427,7 @@
<td class="cbi-value-field" style="width:310px;text-align:right">
<input id="<%=net:id()%>-iw-toggle" type="button" class="cbi-button cbi-button-reload" style="width:100px" onclick="wifi_shutdown('<%=net:id()%>', this)" title="<%:Delete this network%>" value="<%:Enable%>" />
<input type="button" class="cbi-button cbi-button-edit" style="width:100px" onclick="location.href='<%=net:adminlink()%>'" title="<%:Edit this network%>" value="<%:Edit%>" />
- <input type="button" class="cbi-button cbi-button-remove" style="width:100px" onclick="wifi_delete('<%=net:ifname()%>')" title="<%:Delete this network%>" value="<%:Remove%>" />
+ <input type="button" class="cbi-button cbi-button-remove" style="width:100px" onclick="wifi_delete('<%=net:id()%>')" title="<%:Delete this network%>" value="<%:Remove%>" />
</td>
</tr>
<% end %>
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 8bfc61b99b..8976e30cba 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
@@ -276,20 +276,56 @@
var s = String.format(
'<strong><%:Status%>: </strong>%s<br />' +
'<strong><%:Line State%>: </strong>%s [0x%x]<br />' +
- '<strong><%:Line Speed%>: </strong>%s/s / %s/s<br />' +
- '<strong><%:Line Attenuation%>: </strong>%s dB / %s dB<br />' +
- '<strong><%:Noise Margin%>: </strong>%s dB / %s dB<br />',
+ '<strong><%:Line Mode%>: </strong>%s<br />' +
+ '<strong><%:Annex%>: </strong>%s<br />' +
+ '<strong><%:Profile%>: </strong>%s<br />' +
+ '<strong><%:Data Rate%>: </strong>%s/s / %s/s<br />' +
+ '<strong><%:Max. Attainable Data Rate (ATTNDR)%>: </strong>%s/s / %s/s<br />' +
+ '<strong><%:Latency%>: </strong>%s / %s<br />' +
+ '<strong><%:Line Attenuation (LATN)%>: </strong>%s dB / %s dB<br />' +
+ '<strong><%:Signal Attenuation (SATN)%>: </strong>%s dB / %s dB<br />' +
+ '<strong><%:Noise Margin (SNR)%>: </strong>%s dB / %s dB<br />' +
+ '<strong><%:Aggregate Transmit Power(ACTATP)%>: </strong>%s dB / %s dB<br />' +
+ '<strong><%:Forward Error Correction Seconds (FECS)%>: </strong>%s / %s<br />' +
+ '<strong><%:Errored seconds (ES)%>: </strong>%s / %s<br />' +
+ '<strong><%:Severely Errored Seconds (SES)%>: </strong>%s / %s<br />' +
+ '<strong><%:Loss of Signal Seconds (LOSS)%>: </strong>%s / %s<br />' +
+ '<strong><%:Unavailable Seconds (UAS)%>: </strong>%s / %s<br />' +
+ '<strong><%:Header Error Code Errors (HEC)%>: </strong>%s / %s<br />' +
+ '<strong><%:Non Pre-emtive CRC errors (CRC_P)%>: </strong>%s / %s<br />' +
+ '<strong><%:Pre-emtive CRC errors (CRCP_P)%>: </strong>%s / %s<br />' +
+ '<strong><%:Line Uptime%>: </strong>%s<br />' +
+ '<strong><%:ATU-C System Vendor ID%>: </strong>%s<br />' +
+ '<strong><%:Power Management Mode%>: </strong>%s<br />',
info.dsl.line_state, info.dsl.line_state_detail,
info.dsl.line_state_num,
+ info.dsl.line_mode_s,
+ 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.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,
+ info.dsl.errors_ses_near, info.dsl.errors_ses_far,
+ info.dsl.errors_loss_near, info.dsl.errors_loss_far,
+ info.dsl.errors_uas_near, info.dsl.errors_uas_far,
+ info.dsl.errors_hec_near, info.dsl.errors_hec_far,
+ info.dsl.errors_crc_p_near, info.dsl.errors_crc_p_far,
+ info.dsl.errors_crcp_p_near, info.dsl.errors_crcp_p_far,
+ info.dsl.line_uptime_s,
+ info.dsl.atuc_vendor_id,
+ info.dsl.power_mode_s
);
dsl_s.innerHTML = String.format('<small>%s</small>', s);
dsl_i.innerHTML = String.format(
'<img src="<%=resource%>/icons/ethernet.png" />' +
- '<br /><small>ADSL</small>'
+ '<br /><small>DSL</small>'
);
<% end %>
@@ -305,7 +341,9 @@
{
var timestr;
- if (info.leases[i].expires <= 0)
+ if (info.leases[i].expires === false)
+ timestr = '<em><%:unlimited%></em>';
+ else if (info.leases[i].expires <= 0)
timestr = '<em><%:expired%></em>';
else
timestr = String.format('%t', info.leases[i].expires);
@@ -343,7 +381,9 @@
{
var timestr;
- if (info.leases6[i].expires <= 0)
+ if (info.leases6[i].expires === false)
+ timestr = '<em><%:unlimited%></em>';
+ else if (info.leases6[i].expires <= 0)
timestr = '<em><%:expired%></em>';
else
timestr = String.format('%t', info.leases6[i].expires);
@@ -435,7 +475,7 @@
'<strong><%:Bitrate%>:</strong> %s <%:Mbit/s%><br />',
icon, net.signal, net.noise,
net.quality,
- net.link, net.ssid,
+ net.link, net.ssid || '?',
net.mode,
net.channel, net.frequency,
net.bitrate || '?'
@@ -446,7 +486,7 @@
s += String.format(
'<strong><%:BSSID%>:</strong> %s<br />' +
'<strong><%:Encryption%>:</strong> %s',
- net.bssid,
+ net.bssid || '?',
net.encryption
);
}
@@ -707,9 +747,9 @@
<% if has_dsl then %>
<fieldset class="cbi-section">
- <legend><%:ADSL%></legend>
+ <legend><%:DSL%></legend>
<table width="100%" cellspacing="10">
- <tr><td width="33%" style="vertical-align:top"><%:ADSL Status%></td><td>
+ <tr><td width="33%" style="vertical-align:top"><%:DSL Status%></td><td>
<table><tr>
<td id="dsl_i" style="width:16px; text-align:center; padding:3px"><img src="<%=resource%>/icons/ethernet_disabled.png" /><br /><small>?</small></td>
<td id="dsl_s" style="vertical-align:middle; padding: 3px"><em><%:Collecting data...%></em></td>
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm
index f49469a599..3f4b83b80b 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm
@@ -9,6 +9,7 @@
require "luci.sys.iptparser"
local wba = require "luci.tools.webadmin"
local fs = require "nixio.fs"
+ local io = require "io"
local has_ip6tables = fs.access("/usr/sbin/ip6tables")
local mode = 4
@@ -47,6 +48,15 @@
local tables = { "Filter", "NAT", "Mangle", "Raw" }
if mode == 6 then
tables = { "Filter", "Mangle", "Raw" }
+ local ok, lines = pcall(io.lines, "/proc/net/ip6_tables_names")
+ if ok and lines then
+ local line
+ for line in lines do
+ if line == "nat" then
+ tables = { "Filter", "NAT", "Mangle", "Raw" }
+ end
+ end
+ end
end
-%>
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_system/upgrade.htm b/modules/luci-mod-admin-full/luasrc/view/admin_system/upgrade.htm
index 5ca0398e13..7175248dbb 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_system/upgrade.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_system/upgrade.htm
@@ -24,7 +24,9 @@
<fieldset class="cbi-section">
<ul>
- <li><%:Checksum%>: <code><%=checksum%></code></li>
+ <li><%:Checksum%><br />
+ <%:MD5%>: <code><%=checksum%></code><br />
+ <%:SHA256%>: <code><%=sha256ch%></code></li>
<li><%:Size%>: <%
local w = require "luci.tools.webadmin"
write(w.byte_format(size))