summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua8
-rwxr-xr-xapplications/luci-app-statistics/root/usr/bin/stat-genconfig2
-rwxr-xr-xmodules/luci-mod-network/root/etc/uci-defaults/50_luci-mod-admin-full2
-rw-r--r--modules/luci-mod-status/luasrc/view/admin_status/connections.htm51
-rw-r--r--protocols/luci-proto-ncm/luasrc/model/cbi/admin_network/proto_ncm.lua6
-rw-r--r--protocols/luci-proto-qmi/luasrc/model/cbi/admin_network/proto_qmi.lua28
-rw-r--r--themes/luci-theme-material/luasrc/view/themes/material/header.htm2
7 files changed, 78 insertions, 21 deletions
diff --git a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua
index 3179da63b..bcee6efe0 100644
--- a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua
+++ b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua
@@ -20,6 +20,14 @@ hosts = s:option( Value, "Hosts", translate("Monitor hosts"), translate ("Add mu
hosts.default = "127.0.0.1"
hosts:depends( "enable", 1 )
+-- collectd_ping.adressfamily (AddressFamily)
+addressfamily = s:option( ListValue, "AddressFamily", translate("Address family") )
+addressfamily.default = "any"
+addressfamily:value( "any" )
+addressfamily:value( "ipv4" )
+addressfamily:value( "ipv6" )
+addressfamily:depends( "enable", 1 )
+
-- collectd_ping.ttl (TTL)
ttl = s:option( Value, "TTL", translate("TTL for ping packets") )
ttl.isinteger = true
diff --git a/applications/luci-app-statistics/root/usr/bin/stat-genconfig b/applications/luci-app-statistics/root/usr/bin/stat-genconfig
index 55cc6979e..cb091ae67 100755
--- a/applications/luci-app-statistics/root/usr/bin/stat-genconfig
+++ b/applications/luci-app-statistics/root/usr/bin/stat-genconfig
@@ -411,7 +411,7 @@ plugins = {
},
ping = {
- { "TTL", "Interval" },
+ { "TTL", "Interval", "AddressFamily" },
{ },
{ "Hosts" }
},
diff --git a/modules/luci-mod-network/root/etc/uci-defaults/50_luci-mod-admin-full b/modules/luci-mod-network/root/etc/uci-defaults/50_luci-mod-admin-full
index 372eb1512..140c83299 100755
--- a/modules/luci-mod-network/root/etc/uci-defaults/50_luci-mod-admin-full
+++ b/modules/luci-mod-network/root/etc/uci-defaults/50_luci-mod-admin-full
@@ -5,7 +5,7 @@ if [ "$(uci -q get luci.diag)" != "internal" ]; then
if [ -s /etc/os-release ]; then
. /etc/os-release
- host="${HOME_URL:-${BUG_URL:-$LEDE_DEVICE_MANUFACTURER_URL}}"
+ host="${HOME_URL:-${BUG_URL:-$OPENWRT_DEVICE_MANUFACTURER_URL}}"
host="${host#*://}"
host="${host%%/*}"
fi
diff --git a/modules/luci-mod-status/luasrc/view/admin_status/connections.htm b/modules/luci-mod-status/luasrc/view/admin_status/connections.htm
index e3dd39d60..37debcde6 100644
--- a/modules/luci-mod-status/luasrc/view/admin_status/connections.htm
+++ b/modules/luci-mod-status/luasrc/view/admin_status/connections.htm
@@ -131,15 +131,21 @@
}
label_scale.innerHTML = String.format('<%:(%d minute window, %d second interval)%>', data_wanted / 60, 3);
+
+ var recheck_lookup_queue = {};
/* render datasets, start update interval */
XHR.poll(3, '<%=build_url("admin/status/realtime/connections_status")%>', null,
function(x, json)
{
- var rows = [];
+
+ if (!json.connections)
+ return;
+
var conn = json.connections;
var lookup_queue = [ ];
+ var rows = [];
conn.sort(function(a, b) {
return b.bytes - a.bytes;
@@ -150,13 +156,13 @@
var c = conn[i];
if ((c.src == '127.0.0.1' && c.dst == '127.0.0.1') ||
- (c.src == '::1' && c.dst == '::1'))
+ (c.src == '::1' && c.dst == '::1'))
continue;
- if (!dns_cache[c.src])
+ if (!dns_cache[c.src] && lookup_queue.indexOf(c.src) == -1)
lookup_queue.push(c.src);
- if (!dns_cache[c.dst])
+ if (!dns_cache[c.dst] && lookup_queue.indexOf(c.dst) == -1)
lookup_queue.push(c.dst);
var src = dns_cache[c.src] || (c.layer3 == 'ipv6' ? '[' + c.src + ']' : c.src);
@@ -173,14 +179,39 @@
cbi_update_table(conn_table, rows, '<em><%:No information available%></em>');
- if (lookup_queue.length > 0)
- XHR.get('<%=build_url("admin/status/nameinfo")%>/' + lookup_queue.slice(0, 100).join('/'), null,
- function(x, json)
- {
- for (var addr in json)
- dns_cache[addr] = json[addr];
+ if (lookup_queue.length > 0) {
+ var reduced_lookup_queue = lookup_queue;
+
+ if (lookup_queue.length > 100)
+ reduced_lookup_queue = lookup_queue.slice(0, 100);
+
+ XHR.get('<%=build_url("admin/status/nameinfo")%>/' + reduced_lookup_queue.join('/'), null,
+ function(x, json) {
+ if (!json)
+ return;
+
+ for (var index in reduced_lookup_queue) {
+ var address = reduced_lookup_queue[index];
+
+ if (!address)
+ continue;
+
+ if (json[address]) {
+ dns_cache[address] = json[address];
+ lookup_queue.splice(reduced_lookup_queue.indexOf(address),1);
+ continue;
+ }
+
+ if(recheck_lookup_queue[address] > 2) {
+ dns_cache[address] = (address.match(/:/)) ? '[' + address + ']' : address;
+ lookup_queue.splice(index,1);
+ } else {
+ recheck_lookup_queue[address] != null ? recheck_lookup_queue[address]++ : recheck_lookup_queue[address] = 0;
+ }
+ }
}
);
+ }
var data = json.statistics;
diff --git a/protocols/luci-proto-ncm/luasrc/model/cbi/admin_network/proto_ncm.lua b/protocols/luci-proto-ncm/luasrc/model/cbi/admin_network/proto_ncm.lua
index 318db7e77..3fe4ef33a 100644
--- a/protocols/luci-proto-ncm/luasrc/model/cbi/admin_network/proto_ncm.lua
+++ b/protocols/luci-proto-ncm/luasrc/model/cbi/admin_network/proto_ncm.lua
@@ -12,7 +12,7 @@ You may obtain a copy of the License at
local map, section, net = ...
-local device, apn, service, pincode, username, password
+local device, apn, service, pincode, username, password, dialnum
local ipv6, delay, defaultroute, metric, peerdns, dns
@@ -57,6 +57,10 @@ password = section:taboption("general", Value, "password", translate("PAP/CHAP p
password.password = true
+dialnum = section:taboption("general", Value, "dialnum", translate("Dial number"))
+dialnum.placeholder = "*99#"
+
+
if luci.model.network:has_ipv6() then
ipv6 = section:taboption("advanced", ListValue, "ipv6")
diff --git a/protocols/luci-proto-qmi/luasrc/model/cbi/admin_network/proto_qmi.lua b/protocols/luci-proto-qmi/luasrc/model/cbi/admin_network/proto_qmi.lua
index e11201d21..9cc1ae0cf 100644
--- a/protocols/luci-proto-qmi/luasrc/model/cbi/admin_network/proto_qmi.lua
+++ b/protocols/luci-proto-qmi/luasrc/model/cbi/admin_network/proto_qmi.lua
@@ -4,7 +4,7 @@
local map, section, net = ...
local device, apn, pincode, username, password
-local auth, ipv6
+local auth, ipv6, delay
device = section:taboption("general", Value, "device", translate("Modem device"))
@@ -26,20 +26,34 @@ apn = section:taboption("general", Value, "apn", translate("APN"))
pincode = section:taboption("general", Value, "pincode", translate("PIN"))
+auth = section:taboption("general", Value, "auth", translate("Authentication Type"))
+auth:value("both", "PAP/CHAP (both)")
+auth:value("pap", "PAP")
+auth:value("chap", "CHAP")
+auth:value("none", "NONE")
+auth.default = "none"
+
+
username = section:taboption("general", Value, "username", translate("PAP/CHAP username"))
+username:depends("auth", "pap")
+username:depends("auth", "chap")
+username:depends("auth", "both")
password = section:taboption("general", Value, "password", translate("PAP/CHAP password"))
+password:depends("auth", "pap")
+password:depends("auth", "chap")
+password:depends("auth", "both")
password.password = true
-auth = section:taboption("general", Value, "auth", translate("Authentication Type"))
-auth:value("", translate("-- Please choose --"))
-auth:value("both", "PAP/CHAP (both)")
-auth:value("pap", "PAP")
-auth:value("chap", "CHAP")
-auth:value("none", "NONE")
if luci.model.network:has_ipv6() then
ipv6 = section:taboption("advanced", Flag, "ipv6", translate("Enable IPv6 negotiation"))
ipv6.default = ipv6.disabled
end
+
+delay = section:taboption("advanced", Value, "delay",
+ translate("Modem init timeout"),
+ translate("Maximum amount of seconds to wait for the modem to become ready"))
+delay.placeholder = "10"
+delay.datatype = "min(1)"
diff --git a/themes/luci-theme-material/luasrc/view/themes/material/header.htm b/themes/luci-theme-material/luasrc/view/themes/material/header.htm
index f463ef5cb..9521314e1 100644
--- a/themes/luci-theme-material/luasrc/view/themes/material/header.htm
+++ b/themes/luci-theme-material/luasrc/view/themes/material/header.htm
@@ -219,7 +219,7 @@
</div>
</header>
<div class="main">
- <div style="" class="loading"><span><div class="loading-img"></div>Loading...</span></div>
+ <div style="" class="loading"><span><div class="loading-img"></div><%:Collecting data...%></span></div>
<div class="main-left">
<% render_topmenu() %>
</div>