Merge pull request #5120 from dibdot/fwknopd-fix
authorJo-Philipp Wich <jo@mein.io>
Sat, 12 Jun 2021 16:54:05 +0000 (18:54 +0200)
committerGitHub <noreply@github.com>
Sat, 12 Jun 2021 16:54:05 +0000 (18:54 +0200)
luci-app-fwknopd: trivial typo fix

27 files changed:
applications/luci-app-acl/po/ja/acl.po
applications/luci-app-acme/po/ja/acme.po
applications/luci-app-acme/po/ko/acme.po
applications/luci-app-mwan3/po/ja/mwan3.po
applications/luci-app-vpn-policy-routing/Makefile
applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua
applications/luci-app-vpn-policy-routing/po/templates/vpn-policy-routing.pot
contrib/package/lucihttp/Makefile
libs/rpcd-mod-luci/src/luci.c
modules/luci-base/htdocs/luci-static/resources/network.js
modules/luci-base/htdocs/luci-static/resources/ui.js
modules/luci-base/po/es/base.po
modules/luci-base/po/ko/base.po
modules/luci-base/po/pt_BR/base.po
modules/luci-base/po/zh_Hans/base.po
modules/luci-mod-dashboard/po/ja/dashboard.po
modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js
modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
modules/luci-mod-status/htdocs/luci-static/resources/view/status/bandwidth.js
modules/luci-mod-status/htdocs/luci-static/resources/view/status/connections.js
modules/luci-mod-status/htdocs/luci-static/resources/view/status/load.js
modules/luci-mod-status/htdocs/luci-static/resources/view/status/wireless.js
themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm
themes/luci-theme-material/luasrc/view/themes/material/header.htm
themes/luci-theme-openwrt-2020/luasrc/view/themes/openwrt2020/header.htm
themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm

index ffb94367891c436eef432fc6a40d75147b9a5d0e..b2a3ca12d0eecdbd49282f05507a65ae6856c3a5 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"PO-Revision-Date: 2021-02-06 08:29+0000\n"
+"PO-Revision-Date: 2021-06-11 06:32+0000\n"
 "Last-Translator: Satoru Yoshida <ramat@ram.ne.jp>\n"
 "Language-Team: Japanese <https://hosted.weblate.org/projects/openwrt/"
 "luciapplicationsacl/ja/>\n"
@@ -10,7 +10,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.5-dev\n"
+"X-Generator: Weblate 4.7-dev\n"
 
 #: applications/luci-app-acl/root/usr/share/luci/menu.d/luci-app-acl.json:3
 msgid "ACL Settings"
@@ -83,7 +83,7 @@ msgstr ""
 
 #: applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js:232
 msgid "The system account to use the password from"
-msgstr ""
+msgstr "パスワードを使用するシステムアカウント"
 
 #: applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js:232
 msgid "UNIX account"
@@ -91,7 +91,7 @@ msgstr "UNIX アカウント"
 
 #: applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js:282
 msgid "Unable to encrypt plaintext password: %s"
-msgstr ""
+msgstr "平文パスワードを暗号化できません: %s"
 
 #: applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js:217
 msgid "Use UNIX password in /etc/shadow"
@@ -103,7 +103,7 @@ msgstr "暗号化されたパスワードハッシュを使用"
 
 #: applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js:219
 msgid "Use plain password"
-msgstr ""
+msgstr "平文パスワードを使用"
 
 #: applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js:300
 msgid "Write access"
@@ -118,7 +118,7 @@ msgstr "拒否"
 
 #: applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js:294
 msgid "does not expire"
-msgstr ""
+msgstr "有効期限なし"
 
 #: applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js:63
 #: applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js:95
@@ -131,7 +131,7 @@ msgstr "すべて"
 #: applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js:307
 msgctxt "Select individual permissions manually"
 msgid "individual"
-msgstr ""
+msgstr "個別"
 
 #: applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js:65
 msgctxt "Some permissions granted"
index ec96e3db9c6ad835d4ee419806c8866578727803..1143a9713a59c98de43dc049c3d32a9b3ba38ce6 100644 (file)
@@ -1,14 +1,14 @@
 msgid ""
 msgstr ""
-"PO-Revision-Date: 2020-12-10 19:29+0000\n"
-"Last-Translator: Ryota <21ryotagamer@gmail.com>\n"
+"PO-Revision-Date: 2021-06-11 06:32+0000\n"
+"Last-Translator: Satoru Yoshida <ramat@ram.ne.jp>\n"
 "Language-Team: Japanese <https://hosted.weblate.org/projects/openwrt/"
 "luciapplicationsacme/ja/>\n"
 "Language: ja\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.4-dev\n"
+"X-Generator: Weblate 4.7-dev\n"
 
 #: applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js:17
 msgid "ACME certificates"
@@ -16,7 +16,7 @@ msgstr "ACME証明書"
 
 #: applications/luci-app-acme/root/usr/share/luci/menu.d/luci-app-acme.json:3
 msgid "ACME certs"
-msgstr ""
+msgstr "ACME証明書"
 
 #: applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js:26
 msgid "ACME global config"
@@ -24,7 +24,7 @@ msgstr "ACMEグローバル設定"
 
 #: applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js:139
 msgid "ACME server URL"
-msgstr ""
+msgstr "ACMEサーバーのURL"
 
 #: applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js:34
 msgid "Account email"
@@ -68,7 +68,7 @@ msgstr "DNS API資格情報"
 
 #: applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js:145
 msgid "Days until renewal"
-msgstr ""
+msgstr "更新までの日数"
 
 #: applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js:128
 msgid "Domain Alias"
@@ -145,7 +145,7 @@ msgstr "RSA4096ビット"
 
 #: applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js:95
 msgid "Standalone"
-msgstr ""
+msgstr "スタンドアロン"
 
 #: applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js:92
 msgid ""
index 8c265d7e8d21ab83fa295ff349ff2e556454f071..d589bce8da6c1aabeae03afd9f7d894eb45d327d 100644 (file)
@@ -1,6 +1,6 @@
 msgid ""
 msgstr ""
-"PO-Revision-Date: 2021-03-21 14:31+0000\n"
+"PO-Revision-Date: 2021-06-09 13:32+0000\n"
 "Last-Translator: asdf1234 <cydyellowgreen@gmail.com>\n"
 "Language-Team: Korean <https://hosted.weblate.org/projects/openwrt/"
 "luciapplicationsacme/ko/>\n"
@@ -8,7 +8,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.5.2-dev\n"
+"X-Generator: Weblate 4.7-dev\n"
 
 #: applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js:17
 msgid "ACME certificates"
@@ -68,7 +68,7 @@ msgstr "DNS API 자격 증명"
 
 #: applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js:145
 msgid "Days until renewal"
-msgstr "갱신 일"
+msgstr "갱신일"
 
 #: applications/luci-app-acme/htdocs/luci-static/resources/view/acme.js:128
 msgid "Domain Alias"
index 34bc903b0bf493cd209f72b145e2f082b3fcb6ed..f47d23280dfa1f68c79cc21fd0b6d94a6194a9e2 100644 (file)
@@ -2,8 +2,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: \n"
 "POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-12-10 19:29+0000\n"
-"Last-Translator: Ryota <21ryotagamer@gmail.com>\n"
+"PO-Revision-Date: 2021-06-11 06:32+0000\n"
+"Last-Translator: Satoru Yoshida <ramat@ram.ne.jp>\n"
 "Language-Team: Japanese <https://hosted.weblate.org/projects/openwrt/"
 "luciapplicationsmwan3/ja/>\n"
 "Language: ja\n"
@@ -11,7 +11,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.4-dev\n"
+"X-Generator: Weblate 4.7-dev\n"
 
 #: applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua:176
 #: applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua:192
@@ -675,7 +675,7 @@ msgstr "送信元ポート"
 
 #: applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm:78
 msgid "Status"
-msgstr ""
+msgstr "ステータス"
 
 #: applications/luci-app-mwan3/luasrc/model/cbi/mwan/ruleconfig.lua:55
 msgid "Sticky"
@@ -780,7 +780,7 @@ msgstr "トラブルシューティング"
 #: applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm:36
 #: applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm:53
 msgid "Uptime"
-msgstr ""
+msgstr "稼働時間"
 
 #: applications/luci-app-mwan3/luasrc/model/cbi/mwan/ruleconfig.lua:46
 msgid "View the content of /etc/protocols for protocol description"
index 81a6cb485a41ae7bb678598fb73e449dce7b21aa..55cce877578c5cadb8d42f2e9a26d7d6edfc41a0 100644 (file)
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
-PKG_VERSION:=0.3.2-20
+PKG_VERSION:=0.3.4-8
 
 LUCI_TITLE:=VPN Policy-Based Routing Service Web UI
 LUCI_DESCRIPTION:=Provides Web UI for vpn-policy-routing service.
index 82d90e9bf8e322ded50ae4360f366a1f2db3c804..c75f1e373d0ac5c1aef90b12348b0955500a7ae0 100644 (file)
@@ -9,7 +9,6 @@ local jsonc = require "luci.jsonc"
 local http = require "luci.http"
 local nutil = require "nixio.util"
 local dispatcher = require "luci.dispatcher"
-local enabledFlag = uci:get(packageName, "config", "enabled")
 local enc
 
 function getPackageVersion()
@@ -104,6 +103,8 @@ function is_supported_interface(arg)
        local name=arg['.name']
        local proto=arg['proto']
        local ifname=arg['ifname']
+       local device=arg['device']
+       ifname = ifname or device
 
        if name and is_wan(name) then return true end
        if name and supportedIfaces:match('%f[%w]' .. name .. '%f[%W]') then return true end
@@ -268,21 +269,18 @@ webui_sorting.default = "1"
 -- Policies
 p = m:section(TypedSection, "policy", translate("Policies"), translate("Comment, interface and at least one other field are required. Multiple local and remote addresses/devices/domains and ports can be space separated. Placeholders below represent just the format/syntax and will not be used if fields are left blank."))
 p.template = "cbi/tblsection"
-enc = tonumber(uci:get("vpn-policy-routing", "config", "webui_sorting"))
-if not enc or enc ~= 0 then
+if uci:get("vpn-policy-routing", "config", "webui_sorting") == "1" then
        p.sortable  = true
 end
 p.anonymous = true
 p.addremove = true
 
-enc = tonumber(uci:get("vpn-policy-routing", "config", "webui_enable_column"))
-if enc and enc ~= 0 then
+if uci:get("vpn-policy-routing", "config", "webui_enable_column") == "1" then
        le = p:option(Flag, "enabled", translate("Enabled"))
        le.default = "1"
 end
 
-local comment = uci:get_first("vpn-policy-routing", "policy", "comment")
-if comment then
+if uci:get_first("vpn-policy-routing", "policy", "comment") then
        p:option(Value, "comment", translate("Comment"))
 else
        p:option(Value, "name", translate("Name"))
@@ -310,28 +308,21 @@ rp.datatype    = 'list(neg(or(portrange, string)))'
 rp.placeholder = "0-65535"
 rp.rmempty = true
 
-enc = tonumber(uci:get("vpn-policy-routing", "config", "webui_protocol_column"))
-if enc and enc ~= 0 then
+if uci:get("vpn-policy-routing", "config", "webui_protocol_column") == "1" then
        proto = p:option(ListValue, "proto", translate("Protocol"))
        proto:value("", "AUTO")
        proto.default = ""
        proto.rmempty = true
        enc = uci:get_list("vpn-policy-routing", "config", "webui_supported_protocol")
-       local count = 0
-       for key, value in pairs(enc) do
-               count = count + 1
-               proto:value(value:lower(), value:gsub(" ", "/"):upper())
-       end
-       if count == 0 then
+       if next(enc) == nil then
                enc = { "tcp", "udp", "tcp udp", "icmp", "all" }
-               for key,value in pairs(enc) do
-                       proto:value(value:lower(), value:gsub(" ", "/"):upper())
-               end
+       end
+       for key,value in pairs(enc) do
+               proto:value(value:lower(), value:gsub(" ", "/"):upper())
        end
 end
 
-enc = tonumber(uci:get("vpn-policy-routing", "config", "webui_chain_column"))
-if enc and enc ~= 0 then
+if uci:get("vpn-policy-routing", "config", "webui_chain_column") == "1" then
        chain = p:option(ListValue, "chain", translate("Chain"))
        chain:value("", "PREROUTING")
        chain:value("FORWARD", "FORWARD")
@@ -353,8 +344,8 @@ uci:foreach("network", "interface", function(s)
                gw:value(name, name:upper()) 
        end
 end)
-enc = tonumber(uci:get("vpn-policy-routing", "config", "webui_show_ignore_target"))
-if enc and enc ~= 0 then
+if fs.access("/etc/tor/torrc") then gw:value("tor", "TOR") end
+if uci:get("vpn-policy-routing", "config", "webui_show_ignore_target") == "1" then
        gw:value("ignore", "IGNORE")
 end
 
index 27ba9e278cd0f8182f4621e92a6c218ca80a7add..97e1a259010005ac7ffdaf2c36f62805c4105568 100644 (file)
@@ -1,74 +1,74 @@
 msgid ""
 msgstr "Content-Type: text/plain; charset=UTF-8"
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:62
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:61
 msgid "%s (disabled)"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:57
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:56
 msgid "%s (strict mode)"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:51
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:50
 msgid "%s is not installed or not found"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:189
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:190
 msgid ""
 "%sWARNING:%s Please make sure to check the %sREADME%s before changing "
 "anything in this section! Change any of the settings below with extreme "
 "caution!%s"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:259
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:260
 msgid "Add IGNORE Target"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:259
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:260
 msgid ""
 "Adds `IGNORE` to the list of interfaces for policies, allowing you to skip "
 "further processing by VPN Policy Routing."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:188
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:189
 msgid "Advanced Configuration"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:191
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:192
 msgid ""
 "Allows to specify the list of interface names (in lower case) to be "
 "explicitly supported by the service. Can be useful if your OpenVPN tunnels "
 "have dev option other than tun* or tap*."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:194
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:195
 msgid ""
 "Allows to specify the list of interface names (in lower case) to be ignored "
 "by the service. Can be useful if running both VPN server and VPN client on "
 "the router."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:214
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:215
 msgid "Append"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:163
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:164
 msgid "Basic Configuration"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:197
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:198
 msgid "Boot Time-out"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:335
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:326
 msgid "Chain"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:286
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:284
 msgid "Comment"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:269
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:270
 msgid ""
 "Comment, interface and at least one other field are required. Multiple local "
 "and remote addresses/devices/domains and ports can be space separated. "
@@ -76,35 +76,35 @@ msgid ""
 "fields are left blank."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:167
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:168
 msgid "Condensed output"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:158
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:159
 msgid "Configuration"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:165
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:166
 msgid "Controls both system log and console output verbosity."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:373
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:364
 msgid "Custom User File Includes"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:180
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:181
 msgid "DNSMASQ ipset"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:366
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:357
 msgid "DSCP Tag"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:361
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:352
 msgid "DSCP Tagging"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:218
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:219
 msgid "Default ICMP Interface"
 msgstr ""
 
@@ -112,23 +112,23 @@ msgstr ""
 msgid "Disable"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:179
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:184
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:203
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:209
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:245
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:249
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:256
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:260
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:264
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:180
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:185
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:204
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:210
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:246
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:250
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:257
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:261
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:265
 msgid "Disabled"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:252
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:253
 msgid "Display these protocols in protocol column in Web UI."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:173
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:174
 msgid "Do not enforce policies when their gateway is down"
 msgstr ""
 
@@ -136,24 +136,24 @@ msgstr ""
 msgid "Enable"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:185
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:246
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:250
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:257
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:261
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:265
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:280
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:380
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:186
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:247
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:251
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:258
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:262
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:266
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:279
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:371
 msgid "Enabled"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:237
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:238
 msgid ""
 "FW Mask used by the service. High mask is used to avoid conflict with SQM/"
 "QoS. Change with caution together with"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:218
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:219
 msgid "Force the ICMP protocol interface."
 msgstr ""
 
@@ -161,23 +161,23 @@ msgstr ""
 msgid "Grant UCI and file access for luci-app-vpn-policy-routing"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:213
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:214
 msgid "IPTables rule option"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:183
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:184
 msgid "IPv6 Support"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:194
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:195
 msgid "Ignored Interfaces"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:215
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:216
 msgid "Insert"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:344
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:335
 msgid "Interface"
 msgstr ""
 
@@ -185,49 +185,49 @@ msgstr ""
 msgid "Loading"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:291
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:289
 msgid "Local addresses / devices"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:298
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:296
 msgid "Local ports"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:288
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:286
 msgid "Name"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:219
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:220
 msgid "No Change"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:165
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:166
 msgid "Output verbosity"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:383
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:374
 msgid "Path"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:178
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:202
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:208
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:179
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:203
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:209
 msgid "Please check the %sREADME%s before changing this option."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:269
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:270
 msgid "Policies"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:315
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:312
 msgid "Protocol"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:303
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:301
 msgid "Remote addresses / domains"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:308
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:306
 msgid "Remote ports"
 msgstr ""
 
@@ -235,94 +235,94 @@ msgstr ""
 msgid "Restart"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:374
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:365
 msgid ""
 "Run the following user files after setting up but before restarting DNSMASQ. "
 "See the %sREADME%s for details."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:55
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:54
 msgid "Running"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:172
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:173
 msgid "See the %sREADME%s for details."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:213
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:214
 msgid "Select Append for -A and Insert for -I."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:153
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:154
 msgid "Service Control"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:143
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:144
 msgid "Service Errors"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:232
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:237
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:233
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:238
 msgid "Service FW Mask"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:138
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:139
 msgid "Service Gateways"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:134
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:135
 msgid "Service Status"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:133
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:134
 msgid "Service Status [%s %s]"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:148
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:149
 msgid "Service Warnings"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:362
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:353
 msgid ""
 "Set DSCP tags (in range between 1 and 63) for specific interfaces. See the "
 "%sREADME%s for details."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:255
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:256
 msgid "Show Chain Column"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:244
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:245
 msgid "Show Enable Column"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:248
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:249
 msgid "Show Protocol Column"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:263
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:264
 msgid "Show Up/Down Buttons"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:263
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:264
 msgid ""
 "Shows the Up/Down buttons for policies, allowing you to move a policy up or "
 "down in the list."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:255
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:256
 msgid ""
 "Shows the chain column for policies, allowing you to assign a PREROUTING, "
 "FORWARD, INPUT or OUTPUT chain to a policy."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:244
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:245
 msgid ""
 "Shows the enable checkbox column for policies, allowing you to quickly "
 "enable/disable specific policy without deleting it."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:248
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:249
 msgid ""
 "Shows the protocol column for policies, allowing you to assign a specific "
 "protocol to a policy."
@@ -332,13 +332,13 @@ msgstr ""
 msgid "Start"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:232
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:233
 msgid ""
 "Starting (WAN) FW Mark for marks used by the service. High starting mark is "
 "used to avoid conflict with SQM/QoS. Change with caution together with"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:227
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:228
 msgid "Starting (WAN) Table ID number for tables created by the service."
 msgstr ""
 
@@ -346,27 +346,27 @@ msgstr ""
 msgid "Stop"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:60
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:59
 msgid "Stopped"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:171
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:172
 msgid "Strict enforcement"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:174
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:175
 msgid "Strictly enforce policies when their gateway is down"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:191
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:192
 msgid "Supported Interfaces"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:252
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:253
 msgid "Supported Protocols"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:166
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:167
 msgid "Suppress/No output"
 msgstr ""
 
@@ -374,25 +374,25 @@ msgstr ""
 msgid "The %s indicates default gateway. See the %sREADME%s for details."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:207
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:208
 msgid "The ipset option for local policies"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:201
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:202
 msgid "The ipset option for remote policies"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:197
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:198
 msgid ""
 "Time (in seconds) for service to wait for WAN gateway discovery on boot."
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:204
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:210
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:205
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:211
 msgid "Use ipset command"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:177
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:178
 msgid "Use resolver's ipset for domains"
 msgstr ""
 
@@ -404,27 +404,27 @@ msgstr ""
 msgid "VPN Policy Routing"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:131
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:132
 msgid "VPN and WAN Policy-Based Routing"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:168
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:169
 msgid "Verbose output"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:220
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:221
 msgid "WAN"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:232
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:237
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:233
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:238
 msgid "WAN Table FW Mark"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:227
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:228
 msgid "WAN Table ID"
 msgstr ""
 
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:242
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:243
 msgid "Web UI Configuration"
 msgstr ""
index a1b740deedf6007757c61ae5e2163150dd11f240..e0deae10f3d81e907051f2ba718a4817718b063e 100644 (file)
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/jow-/lucihttp.git
-PKG_SOURCE_DATE:=2019-07-05
-PKG_SOURCE_VERSION:=a34a17d501c0e23f0a91dd9d3e87697347c861ba
-PKG_MIRROR_HASH:=f08b526515b4a654e5529457da9d0676696170846288c55863dba087417a0483
+PKG_SOURCE_DATE:=2021-06-11
+PKG_SOURCE_VERSION:=3dc89af443410c9eae7a0ff091bd7fb4c5d48f41
+PKG_MIRROR_HASH:=6024a34c514a7231bcc36486abfb3e43e6c17490ac8d838f202a43ce259cda03
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=ISC
@@ -35,7 +35,7 @@ endef
 
 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
 
-CMAKE_OPTIONS = \
+CMAKE_OPTIONS += \
        -DLUAPATH=/usr/lib/lua \
        -DBUILD_LUA=$(if $(CONFIG_PACKAGE_liblucihttp-lua),ON,OFF) \
        -DBUILD_TESTS=OFF
index 258d2ec86b58a5fd23a74a5425b2c716f2034754..613cea5e73855c3219ded41135733ee47d63209a 100644 (file)
@@ -765,6 +765,30 @@ rpc_luci_parse_network_device_sys(const char *name, struct ifaddrs *ifaddr)
        blobmsg_add_u8(&blob, "pointtopoint", ifa_flags & IFF_POINTOPOINT);
        blobmsg_close_table(&blob, o2);
 
+       o2 = blobmsg_open_table(&blob, "link");
+
+       p = readstr("/sys/class/net/%s/speed", name);
+       if (*p)
+               blobmsg_add_u32(&blob, "speed", atoi(p));
+
+       p = readstr("/sys/class/net/%s/duplex", name);
+       if (*p)
+               blobmsg_add_string(&blob, "duplex", p);
+
+       n = atoi(readstr("/sys/class/net/%s/carrier", name));
+       blobmsg_add_u8(&blob, "carrier", n == 1);
+
+       n = atoi(readstr("/sys/class/net/%s/carrier_changes", name));
+       blobmsg_add_u32(&blob, "changes", n);
+
+       n = atoi(readstr("/sys/class/net/%s/carrier_up_count", name));
+       blobmsg_add_u32(&blob, "up_count", n);
+
+       n = atoi(readstr("/sys/class/net/%s/carrier_down_count", name));
+       blobmsg_add_u32(&blob, "down_count", n);
+
+       blobmsg_close_table(&blob, o2);
+
        blobmsg_close_table(&blob, o);
 }
 
index 39b8b2dc853c923b9acbcb803205e7d96f725ddd..17dd055e2520a5c914f2ac2a9d67c5ef3cd88ae3 100644 (file)
@@ -393,6 +393,7 @@ function initNetworkState(refresh) {
                                        name:     name,
                                        rawname:  name,
                                        flags:    dev.flags,
+                                       link:     dev.link,
                                        stats:    dev.stats,
                                        macaddr:  dev.mac,
                                        type:     dev.type,
@@ -3133,6 +3134,47 @@ Device = baseclass.extend(/** @lends LuCI.network.Device.prototype */ {
                return (stat != null ? stat.rx_packets || 0 : 0);
        },
 
+       /**
+        * Get the carrier state of the network device.
+        *
+        * @returns {boolean}
+        * Returns true if the device has a carrier, e.g. when a cable is
+        * inserted into an ethernet port of false if there is none.
+        */
+       getCarrier: function() {
+               var link = this._devstate('link');
+               return (link != null ? link.carrier || false : false);
+       },
+
+       /**
+        * Get the current link speed of the network device if available.
+        *
+        * @returns {number|null}
+        * Returns the current speed of the network device in Mbps. If the
+        * device supports no ethernet speed levels, null is returned.
+        * If the device supports ethernet speeds but has no carrier, -1 is
+        * returned.
+        */
+       getSpeed: function() {
+               var link = this._devstate('link');
+               return (link != null ? link.speed || null : null);
+       },
+
+       /**
+        * Get the current duplex mode of the network device if available.
+        *
+        * @returns {string|null}
+        * Returns the current duplex mode of the network device. Returns
+        * either "full" or "half" if the device supports duplex modes or
+        * null if the duplex mode is unknown or unsupported.
+        */
+       getDuplex: function() {
+               var link = this._devstate('link'),
+                   duplex = link ? link.duplex : null;
+
+               return (duplex != 'unknown') ? duplex : null;
+       },
+
        /**
         * Get the primary logical interface this device is assigned to.
         *
index 5a0e6d297b748b992792fcb4493bcb9e732bdb97..0e909b6dcc717dbfd76d25930f1b69300f3a976a 100644 (file)
@@ -1201,6 +1201,28 @@ var UIDropdown = UIElement.extend(/** @lends LuCI.ui.Dropdown.prototype */ {
                return sb;
        },
 
+       /** @private */
+       getScrollParent: function(element) {
+               var parent = element,
+                   style = getComputedStyle(element),
+                   excludeStaticParent = (style.position === 'absolute');
+
+               if (style.position === 'fixed')
+                       return document.body;
+
+               while ((parent = parent.parentElement) != null) {
+                       style = getComputedStyle(parent);
+
+                       if (excludeStaticParent && style.position === 'static')
+                               continue;
+
+                       if (/(auto|scroll)/.test(style.overflow + style.overflowY + style.overflowX))
+                               return parent;
+               }
+
+               return document.body;
+       },
+
        /** @private */
        openDropdown: function(sb) {
                var st = window.getComputedStyle(sb, null),
@@ -1209,7 +1231,8 @@ var UIDropdown = UIElement.extend(/** @lends LuCI.ui.Dropdown.prototype */ {
                    fl = findParent(sb, '.cbi-value-field'),
                    sel = ul.querySelector('[selected]'),
                    rect = sb.getBoundingClientRect(),
-                   items = Math.min(this.options.dropdown_items, li.length);
+                   items = Math.min(this.options.dropdown_items, li.length),
+                   scrollParent = this.getScrollParent(sb);
 
                document.querySelectorAll('.cbi-dropdown[open]').forEach(function(s) {
                        s.dispatchEvent(new CustomEvent('cbi-dropdown-close', {}));
@@ -1234,29 +1257,7 @@ var UIDropdown = UIElement.extend(/** @lends LuCI.ui.Dropdown.prototype */ {
                        ul.style.maxHeight = (vpHeight * 0.5) + 'px';
                        ul.style.WebkitOverflowScrolling = 'touch';
 
-                       var getScrollParent = function(element) {
-                               var parent = element,
-                                   style = getComputedStyle(element),
-                                   excludeStaticParent = (style.position === 'absolute');
-
-                               if (style.position === 'fixed')
-                                       return document.body;
-
-                               while ((parent = parent.parentElement) != null) {
-                                       style = getComputedStyle(parent);
-
-                                       if (excludeStaticParent && style.position === 'static')
-                                               continue;
-
-                                       if (/(auto|scroll)/.test(style.overflow + style.overflowY + style.overflowX))
-                                               return parent;
-                               }
-
-                               return document.body;
-                       }
-
-                       var scrollParent = getScrollParent(sb),
-                           scrollFrom = scrollParent.scrollTop,
+                       var scrollFrom = scrollParent.scrollTop,
                            scrollTo = scrollFrom + rect.top - vpHeight * 0.5;
 
                        var scrollStep = function(timestamp) {
@@ -1282,10 +1283,11 @@ var UIDropdown = UIElement.extend(/** @lends LuCI.ui.Dropdown.prototype */ {
                        ul.style.top = ul.style.bottom = '';
 
                        window.requestAnimationFrame(function() {
-                               var itemHeight = li[Math.max(0, li.length - 2)].getBoundingClientRect().height,
+                               var containerRect = scrollParent.getBoundingClientRect(),
+                                   itemHeight = li[Math.max(0, li.length - 2)].getBoundingClientRect().height,
                                    fullHeight = 0,
-                                   spaceAbove = rect.top,
-                                   spaceBelow = window.innerHeight - rect.height - rect.top;
+                                   spaceAbove = rect.top - containerRect.top,
+                                   spaceBelow = containerRect.bottom - rect.bottom;
 
                                for (var i = 0; i < (items == -1 ? li.length : items); i++)
                                        fullHeight += li[i].getBoundingClientRect().height;
index 2a80268cad7826914bde886a443a6d76808e95a8..03dd0dd071ad9d9fcf42ebde24b0960182964d49 100644 (file)
@@ -3,7 +3,7 @@ msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2009-06-10 03:41+0200\n"
-"PO-Revision-Date: 2021-06-07 14:45+0000\n"
+"PO-Revision-Date: 2021-06-09 13:32+0000\n"
 "Last-Translator: Franco Castillo <castillofrancodamian@gmail.com>\n"
 "Language-Team: Spanish <https://hosted.weblate.org/projects/openwrt/luci/es/>"
 "\n"
@@ -1139,7 +1139,7 @@ msgstr "Opciones específicas del puerto de puente"
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js:503
 msgid "Bridge ports"
-msgstr "Puertos de puente"
+msgstr "Puertos del puente"
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:1529
 #, fuzzy
@@ -4998,7 +4998,7 @@ msgstr "¡Campos vacíos!"
 #: modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js:751
 msgid "Only allow communication with non-isolated bridge ports when enabled"
 msgstr ""
-"Solo permita la comunicación con puertos de puente no aislados cuando esté "
+"Solo permita la comunicación con puertos del puente no aislados cuando esté "
 "activado"
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:229
index 8b1fa38293bf4c2438a5a94419c904eb8dec59f2..35a40a298d2b7113671b8003f9c954089740c7b7 100644 (file)
@@ -3,16 +3,16 @@ msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2009-06-10 03:40+0200\n"
-"PO-Revision-Date: 2021-03-21 14:31+0000\n"
+"PO-Revision-Date: 2021-06-09 13:32+0000\n"
 "Last-Translator: asdf1234 <cydyellowgreen@gmail.com>\n"
-"Language-Team: Korean <https://hosted.weblate.org/projects/openwrt/luci/ko/"
-">\n"
+"Language-Team: Korean <https://hosted.weblate.org/projects/openwrt/luci/ko/>"
+"\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
-"X-Generator: Weblate 4.5.2-dev\n"
+"X-Generator: Weblate 4.7-dev\n"
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:1480
 msgid "%.1f dB"
@@ -237,7 +237,7 @@ msgstr "<abbr title=\"Media Access Control\">MAC</abbr>-주소"
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:885
 msgid "<abbr title=\"Neighbour Discovery Protocol\">NDP</abbr>-Proxy"
-msgstr ""
+msgstr "<abbr title=\"Neighbour Discovery Protocol\">NDP</abbr>-프록시"
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:779
 msgid "<abbr title=\"Router Advertisement\">RA</abbr> Flags"
index 4a094dcc33a1a7613c500843cbea8641d1201a8b..3759eb2f608d01520d96edb80ec9ddcfc07777af 100644 (file)
@@ -3,7 +3,7 @@ msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2009-06-10 03:41+0200\n"
-"PO-Revision-Date: 2021-06-07 14:45+0000\n"
+"PO-Revision-Date: 2021-06-11 06:32+0000\n"
 "Last-Translator: Wellington Terumi Uemura <wellingtonuemura@gmail.com>\n"
 "Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
 "openwrt/luci/pt_BR/>\n"
@@ -6425,12 +6425,18 @@ msgid ""
 "options of sent <abbr title=\"Router Advertisement\">RA</abbr> messages. "
 "When enabled, clients will perform stateless IPv6 address autoconfiguration."
 msgstr ""
+"Define o sinalizador autônomo de configuração do endereço nas opções de "
+"informações do prefixo das mensagens enviadas do <abbr title=\"Anúncio do "
+"roteador\">RA</abbr>. Quando ativo, os clientes executarão a configuração "
+"automática de endereço IPv6 sem estado."
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:707
 msgid ""
 "Set this interface as master for RA and DHCPv6 relaying as well as NDP "
 "proxying."
 msgstr ""
+"Defina esta interface como mestre para a retransmissão RA e DHCPv6, bem como "
+"proxy NDP."
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:304
 msgid "Set to currently active slave (active, 1)"
@@ -6460,7 +6466,7 @@ msgstr "Configurar Servidor DHCP"
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:894
 msgid "Setup routes for proxied IPv6 neighbours."
-msgstr ""
+msgstr "Rotas de configuração para vizinhos IPv6 que tiverem proxy."
 
 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js:30
 msgid "Severely Errored Seconds (SES)"
@@ -6603,6 +6609,9 @@ msgid ""
 "Specifies a fixed list of DNS search domains to announce via DHCPv6. If left "
 "unspecified, the local device DNS search domain will be announced."
 msgstr ""
+"Define uma lista fixa de domínios de pesquisa DNS para fazer o anúncio via "
+"DHCPv6. Se não for definido, o domínio de pesquisa DNS do dispositivo local "
+"será anunciado."
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:867
 msgid ""
@@ -6610,6 +6619,10 @@ msgid ""
 "If left unspecified, the device will announce itself as IPv6 DNS server "
 "unless the <em>Local IPv6 DNS server</em> option is disabled."
 msgstr ""
+"Define uma lista fixa de endereços de servidor IPv6 DNS para anunciar via "
+"DHCPv6. Caso não seja definido, o dispositivo se anunciará como sendo um "
+"servidor DNS IPv6, a menos que a opção <em>Local IPv6 DNS</em> seja "
+"desativada."
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:342
 msgid ""
@@ -6648,6 +6661,9 @@ msgid ""
 "messages, for example to instruct clients to request further information via "
 "stateful DHCPv6."
 msgstr ""
+"Determina quais as bandeiras enviadas nas mensagens do <abbr title=\"Anúncio "
+"do roteador\">RA</abbr>, por exemplo, para instruir os clientes que "
+"solicitem mais informações através do estado do DHCPv6."
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:252
 msgid ""
@@ -7149,24 +7165,33 @@ msgid ""
 "<abbr title=\"Router Advertisement, ICMPv6 Type 134\">RA</abbr> messages. "
 "Minimum is 1280 bytes."
 msgstr ""
+"A <abbr title=\"Maximum Transmission Unit\">MTU</abbr> que será publicado "
+"nas mensagens do <abbr title=\"Anúncio do roteador, ICMPv6 Tipo 134\">RA</"
+"abbr>. O mínimo são 1280 bytes."
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:782
 msgid ""
 "The <em>Managed address configuration</em> (M) flag indicates that IPv6 "
 "addresses are available via DHCPv6."
 msgstr ""
+"A <em>configuração do endereço gerenciado</em> o (M) indica que os endereços "
+"IPv6 estão disponíveis via DHCPv6."
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:786
 msgid ""
 "The <em>Mobile IPv6 Home Agent</em> (H) flag indicates that the device is "
 "also acting as Mobile IPv6 home agent on this link."
 msgstr ""
+"O <em>Agente doméstico móvel IPv6</em> (H) indica que o dispositivo também "
+"está agindo como um agente doméstico móvel IPv6 neste link."
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:784
 msgid ""
 "The <em>Other configuration</em> (O) flag indicates that other information, "
 "such as DNS servers, is available via DHCPv6."
 msgstr ""
+"A <em>Outra configuração</em> (O) indica que as outras informações como "
+"servidores DNS estão disponíveis via DHCPv6."
 
 #: modules/luci-mod-system/htdocs/luci-static/resources/view/system/mounts.js:84
 msgid "The <em>block mount</em> command failed with code %d"
@@ -7397,6 +7422,8 @@ msgid ""
 "The maximum hops to be published in <abbr title=\"Router Advertisement\">RA</"
 "abbr> messages. Maximum is 255 hops."
 msgstr ""
+"A quantidade máxima de saltos que serão publicados nas mensagens do <abbr "
+"title=\"Anúncio do roteador\">RA</abbr>. O máximo são 255 saltos."
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js:1969
 msgid "The network name is already used"
@@ -8009,6 +8036,8 @@ msgid ""
 "Upon pressing \"Continue\", ifname options will get renamed and the network "
 "will be restarted to apply the updated configuration."
 msgstr ""
+"Ao pressionar \"Continuar\", as opções ifname serão renomeadas e a rede será "
+"reiniciada para aplicar a atualização da configuração."
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:82
 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js:60
@@ -8672,7 +8701,7 @@ msgstr ""
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:768
 msgid "forced"
-msgstr ""
+msgstr "imposto"
 
 #: modules/luci-base/htdocs/luci-static/resources/tools/widgets.js:85
 #: modules/luci-base/htdocs/luci-static/resources/tools/widgets.js:195
@@ -8732,7 +8761,7 @@ msgstr ""
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:781
 msgid "managed config (M)"
-msgstr ""
+msgstr "configuração gerenciada (M)"
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js:1355
 msgid "medium security"
@@ -8744,7 +8773,7 @@ msgstr "minutos"
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:785
 msgid "mobile home agent (H)"
-msgstr ""
+msgstr "agente doméstico móvel (H)"
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:422
 msgid "netif_carrier_ok()"
@@ -8787,7 +8816,7 @@ msgstr "ligado"
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:766
 msgid "on available prefix"
-msgstr ""
+msgstr "no prefixo disponível"
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js:1356
 msgid "open network"
@@ -8795,7 +8824,7 @@ msgstr "rede aberta"
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:783
 msgid "other config (O)"
-msgstr ""
+msgstr "outra configuração (O)"
 
 #: modules/luci-base/htdocs/luci-static/resources/tools/widgets.js:69
 #: modules/luci-compat/luasrc/view/cbi/firewall_zonelist.htm:46
index da95ca10e31e1cda36b4efb947526783641c59d7..8f2f60d46fcc777ea98da22f27565634a55477be 100644 (file)
@@ -4,8 +4,8 @@
 #
 msgid ""
 msgstr ""
-"PO-Revision-Date: 2021-06-07 14:45+0000\n"
-"Last-Translator: ywx <yangwenxiao4511@gmail.com>\n"
+"PO-Revision-Date: 2021-06-10 05:49+0000\n"
+"Last-Translator: Meano Lee <meanocat@gmail.com>\n"
 "Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/"
 "openwrt/luci/zh_Hans/>\n"
 "Language: zh_Hans\n"
@@ -730,7 +730,7 @@ msgstr "此设备的可选简短描述"
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:1441
 #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js:20
 msgid "Annex"
-msgstr "附件"
+msgstr "Annex"
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js:1442
 msgid "Annex A + L + M (all)"
@@ -4188,8 +4188,8 @@ msgid ""
 "Maximum time allowed between sending unsolicited <abbr title=\"Router "
 "Advertisement, ICMPv6 Type 134\">RA</abbr>. Default is 600 seconds."
 msgstr ""
-"å\8f\91é\80\81ä¸\8d请è\87ªæ\9d¥ç\9a\84 <abbr title=\"Router Advertisement, ICMPv6 Type 134\"> RA </"
-"abbr>间允许相隔的最长时间。默认值是 600 秒。"
+"å\8f\91é\80\81主å\8a¨ <abbr title=\"Router Advertisement, ICMPv6 Type 134\">RA</abbr> "
+"间允许相隔的最长时间。默认值是 600 秒。"
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js:913
 msgid "Maximum transmit power"
@@ -4274,8 +4274,8 @@ msgid ""
 "Minimum time allowed between sending unsolicited <abbr title=\"Router "
 "Advertisement, ICMPv6 Type 134\">RA</abbr>. Default is 200 seconds."
 msgstr ""
-"发送未经请求的 <abbr title=\"Router Advertisement, ICMPv6 Type 134\">RA</"
-"abbr>间允许相隔的最短时间。默认值是 200 秒。"
+"发送主动 <abbr title=\"Router Advertisement, ICMPv6 Type 134\">RA</abbr> "
+"间允许相隔的最短时间。默认值是 200 秒。"
 
 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/switch.js:202
 msgid "Mirror monitor port"
@@ -6367,11 +6367,11 @@ msgstr "明确用于 ARP 监控的 IP 地址"
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:395
 msgid "Specifies the MII link monitoring frequency in milliseconds"
-msgstr "明确 MII 链接监控频率,单位为毫秒"
+msgstr "以毫秒为单位指定 MII 链接监控频率"
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:259
 msgid "Specifies the aggregation selection logic to use"
-msgstr "æ\98\8eç¡®要使用的聚合选择逻辑"
+msgstr "æ\8c\87å®\9a要使用的聚合选择逻辑"
 
 #: modules/luci-mod-system/htdocs/luci-static/resources/view/system/mounts.js:292
 msgid "Specifies the directory the device is attached to"
@@ -6390,9 +6390,7 @@ msgstr ""
 msgid ""
 "Specifies the mac-address for the actor in protocol packet exchanges "
 "(LACPDUs). If empty, masters' mac address defaults to system default"
-msgstr ""
-"明确协议包交换 actor 的 MAC 地址(LACPDUs)。如果为空,master 的 mac 地址默认"
-"为系统默认值"
+msgstr "指定协议包交换 actor 的 MAC 地址(LACPDUs)。如果为空,master 的 mac 地址默认为系统默认值"
 
 #: protocols/luci-proto-relay/htdocs/luci-static/resources/protocol/relay.js:175
 msgid ""
@@ -6423,13 +6421,13 @@ msgstr "明确 asserting 运营商前必须处于活跃状态的链接的最小
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:200
 msgid "Specifies the mode to be used for this bonding interface"
-msgstr "æ\98\8eç¡®用于此 bonding 接口的模式"
+msgstr "æ\8c\87å®\9a用于此 bonding 接口的模式"
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:333
 msgid ""
 "Specifies the number of IGMP membership reports to be issued after a "
 "failover event in 200ms intervals"
-msgstr "æ\98\8eç¡®发生故障转移事件后在200毫秒间隔内发出的 IGMP 成员资格报告的数量"
+msgstr "æ\8c\87å®\9a发生故障转移事件后在200毫秒间隔内发出的 IGMP 成员资格报告的数量"
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:276
 msgid ""
@@ -6441,9 +6439,7 @@ msgstr "指定在切换到下一个从属设备前要传输的数据包数量"
 msgid ""
 "Specifies the number of peer notifications (gratuitous ARPs and unsolicited "
 "IPv6 Neighbor Advertisements) to be issued after a failover event"
-msgstr ""
-"明确一次故障转移事件后要发布的对等通知(无理由的 ARPs 和未经请求的 IPv6 邻居"
-"通告)的数目"
+msgstr "指定一次故障转移事件后要发布的对等通知(无为 ARP 和主动 IPv6 邻居通告)的数目"
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:284
 msgid ""
@@ -6454,13 +6450,13 @@ msgstr ""
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:374
 msgid "Specifies the quantity of ARP IP targets that must be reachable"
-msgstr "æ\98\8eç¡®必须可达的 ARP IP 目标数"
+msgstr "æ\8c\87å®\9a必须可达的 ARP IP 目标数"
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:268
 msgid ""
 "Specifies the rate in which the link partner will be asked to transmit "
 "LACPDU packets"
-msgstr "æ\98\8eç¡®链路伙伴被要求传输 LACPDU 包的速率"
+msgstr "æ\8c\87å®\9a链路伙伴被要求传输 LACPDU 包的速率"
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:225
 msgid ""
@@ -6476,7 +6472,7 @@ msgstr "明确系统优先级"
 msgid ""
 "Specifies the time in milliseconds to wait before disabling a slave after a "
 "link failure detection"
-msgstr "指定在检测到链路故障后,在禁用从属设备之前等待的时间(以毫秒为单位)"
+msgstr "指定在检测到链路故障后,在禁用从属设备之前以毫秒为单位的等待时间"
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:411
 msgid ""
@@ -6509,7 +6505,7 @@ msgstr "指定主备模式是否应在设置从属时,将所有从属设备设
 msgid ""
 "Specifies whether or not miimon should use MII or ETHTOOL ioctls vs. "
 "netif_carrier_ok()"
-msgstr "æ\98\8eç¡®ç\9b¸è¾\83 netif carrier ok()ï¼\8cmiimon 是否应使用 MII 或 ETHTOOL ioctls"
+msgstr "æ\8c\87å®\9aç\9b¸è¾\83 netif_carrier_ok(), miimon 是否应使用 MII 或 ETHTOOL ioctls"
 
 #: protocols/luci-proto-bonding/htdocs/luci-static/resources/protocol/bonding.js:293
 msgid ""
index 9bb03d7ef6f438a0bae552d7d81469c7386e2978..ffb750b450d88c95b950d7dbf3d2e7408dd90e17 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: \n"
-"PO-Revision-Date: 2021-04-14 13:49+0000\n"
+"PO-Revision-Date: 2021-06-11 06:32+0000\n"
 "Last-Translator: Satoru Yoshida <ramat@ram.ne.jp>\n"
 "Language-Team: Japanese <https://hosted.weblate.org/projects/openwrt/"
 "lucimodulesluci-mod-dashboard/ja/>\n"
@@ -10,7 +10,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.6-dev\n"
+"X-Generator: Weblate 4.7-dev\n"
 
 #: modules/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js:163
 msgid "Active"
@@ -70,7 +70,7 @@ msgstr "接続中のデバイス"
 
 #: modules/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js:86
 msgid "Down."
-msgstr ""
+msgstr "ダウン"
 
 #: modules/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/20_lan.js:129
 msgid "Download"
@@ -196,7 +196,7 @@ msgstr "システム"
 
 #: modules/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js:86
 msgid "Up."
-msgstr ""
+msgstr "アップ"
 
 #: modules/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/20_lan.js:124
 msgid "Upload"
index 0515992abe6265bed859e568bc28c6dcf588fe31..b134390a42572663aa3b453c880404c97bbbc274 100644 (file)
@@ -1,5 +1,6 @@
 'use strict';
 'require ui';
+'require dom';
 'require uci';
 'require form';
 'require network';
@@ -80,16 +81,54 @@ function isBridgePort(dev) {
        return isPort;
 }
 
-function renderDevBadge(dev) {
-       var type = dev.getType(), up = dev.isUp();
+function updateDevBadge(node, dev) {
+       var type = dev.getType(),
+           up = dev.getCarrier();
 
-       return E('span', { 'class': 'ifacebadge', 'style': 'font-weight:normal' }, [
+       dom.content(node, [
                E('img', {
                        'class': 'middle',
                        'src': L.resource('icons/%s%s.png').format(type, up ? '' : '_disabled')
                }),
                '\x0a', dev.getName()
        ]);
+
+       return node;
+}
+
+function renderDevBadge(dev) {
+       return updateDevBadge(E('span', {
+               'class': 'ifacebadge port-status-device',
+               'style': 'font-weight:normal',
+               'data-device': dev.getName()
+       }), dev);
+}
+
+function updatePortStatus(node, dev) {
+       var carrier = dev.getCarrier(),
+           duplex = dev.getDuplex(),
+           speed = dev.getSpeed(),
+           desc;
+
+       if (carrier && speed > 0 && duplex != null)
+               desc = E('abbr', {
+                       'title': '%d MBit/s, %s'.format(speed, duplex == 'full' ? _('full-duplex') : _('half-duplex'))
+               }, [ '%d%s'.format(speed, duplex == 'full' ? 'FD' : 'HD') ]);
+       else if (carrier)
+               desc = document.createTextNode(_('Connected'));
+       else
+               desc = document.createTextNode(_('no link'));
+
+       dom.content(node, [ desc ]);
+
+       return node;
+}
+
+function renderPortStatus(dev) {
+       return updatePortStatus(E('span', {
+               'class': 'port-status-link',
+               'data-device': dev.getName()
+       }), dev);
 }
 
 function lookupDevName(s, section_id) {
@@ -789,9 +828,7 @@ return baseclass.extend({
                o.renderWidget = function(/* ... */) {
                        return form.SectionValue.prototype.renderWidget.apply(this, arguments).then(L.bind(function(node) {
                                node.style.overflowX = 'auto';
-                               node.style.overflowY = 'visible';
-                               node.style.paddingBottom = '100px';
-                               node.style.marginBottom = '-100px';
+                               node.style.overflowY = 'hidden';
 
                                return node;
                        }, this));
@@ -841,7 +878,7 @@ return baseclass.extend({
                        this.children = this.children.filter(function(opt) { return !opt.option.match(/^port_/) });
 
                        for (var i = 0; i < devices.length; i++) {
-                               o = ss.option(cbiTagValue, 'port_%s'.format(sfh(devices[i].getName())), renderDevBadge(devices[i]));
+                               o = ss.option(cbiTagValue, 'port_%s'.format(sfh(devices[i].getName())), renderDevBadge(devices[i]), renderPortStatus(devices[i]));
                                o.port = devices[i].getName();
                        }
 
@@ -943,8 +980,21 @@ return baseclass.extend({
                for (var port_name in seen_ports)
                        ports.push(port_name);
 
-               ports.sort();
+               ports.sort(function(a, b) {
+                       var m1 = a.match(/^(.+?)([0-9]*)$/),
+                           m2 = b.match(/^(.+?)([0-9]*)$/);
+
+                       if (m1[1] < m2[1])
+                               return -1;
+                       else if (m1[1] > m2[1])
+                               return 1;
+                       else
+                               return +(m1[2] || 0) - +(m2[2] || 0);
+               });
 
                ss.updatePorts(ports);
-       }
+       },
+
+       updateDevBadge: updateDevBadge,
+       updatePortStatus: updatePortStatus
 });
index 9b2c9bfd5df21d47a208b23d108b363b9308b235..7e9eadf788f77db81afff0f2de8f2d418387cb1d 100644 (file)
@@ -128,7 +128,7 @@ function render_modal_status(node, ifc) {
 
 function render_ifacebox_status(node, ifc) {
        var dev = ifc.getL3Device() || ifc.getDevice(),
-           subdevs = ifc.getDevices(),
+           subdevs = dev ? dev.getPorts() : null,
            c = [ render_iface(dev, ifc.isAlias()) ];
 
        if (subdevs && subdevs.length) {
@@ -319,6 +319,14 @@ return view.extend({
                        btn2.disabled = isReadonlyView || btn1.classList.contains('spinning') || btn2.classList.contains('spinning') || dynamic || disabled;
                }
 
+               document.querySelectorAll('.port-status-device[data-device]').forEach(function(node) {
+                       nettools.updateDevBadge(node, network.instantiateDevice(node.getAttribute('data-device')));
+               });
+
+               document.querySelectorAll('.port-status-link[data-device]').forEach(function(node) {
+                       nettools.updatePortStatus(node, network.instantiateDevice(node.getAttribute('data-device')));
+               });
+
                return Promise.all([ resolveZone, network.flushCache() ]);
        },
 
@@ -392,7 +400,7 @@ return view.extend({
                var tasks = [];
 
                this.deviceWithIfnameSections().forEach(function(ds) {
-                       tasks.push(uci.add('network', ds['.name'], {
+                       tasks.push(uci.callSet('network', ds['.name'], {
                                'ifname': '',
                                'ports': L.toArray(ds.ifname)
                        }));
index d5ec6807800a0f2e8f52abac534a156ba91d9ac8..8f3f7a24ed5cab6a73ac62350048ee6cce8abb23 100644 (file)
@@ -312,16 +312,32 @@ var CBIWifiFrequencyValue = form.Value.extend({
                        this.callFrequencyList(section_id)
                ]).then(L.bind(function(data) {
                        this.channels = {
-                               '11g': L.hasSystemFeature('hostapd', 'acs') ? [ 'auto', 'auto', true ] : [],
-                               '11a': L.hasSystemFeature('hostapd', 'acs') ? [ 'auto', 'auto', true ] : []
+                               '2g': L.hasSystemFeature('hostapd', 'acs') ? [ 'auto', 'auto', true ] : [],
+                               '5g': L.hasSystemFeature('hostapd', 'acs') ? [ 'auto', 'auto', true ] : [],
+                               '6g': [],
+                               '60g': []
                        };
 
-                       for (var i = 0; i < data[1].length; i++)
-                               this.channels[(data[1][i].mhz > 2484) ? '11a' : '11g'].push(
+                       for (var i = 0; i < data[1].length; i++) {
+                               var band;
+
+                               if (data[1][i].mhz >= 2412 && data[1][i].mhz <= 2484)
+                                       band = '2g';
+                               else if (data[1][i].mhz >= 5160 && data[1][i].mhz <= 5885)
+                                       band = '5g';
+                               else if (data[1][i].mhz >= 5925 && data[1][i].mhz <= 7125)
+                                       band = '6g';
+                               else if (data[1][i].mhz >= 58329 && data[1][i].mhz <= 69120)
+                                       band = '60g';
+                               else
+                                       continue;
+
+                               this.channels[band].push(
                                        data[1][i].channel,
                                        '%d (%d Mhz)'.format(data[1][i].channel, data[1][i].mhz),
                                        !data[1][i].restricted
                                );
+                       }
 
                        var hwmodelist = L.toArray(data[0] ? data[0].getHWModes() : null)
                                .reduce(function(o, v) { o[v] = true; return o }, {});
@@ -358,19 +374,19 @@ var CBIWifiFrequencyValue = form.Value.extend({
 
                        this.bands = {
                                '': [
-                                       '11g', '2.4 GHz', this.channels['11g'].length > 3,
-                                       '11a', '5 GHz', this.channels['11a'].length > 3
+                                       '2g', '2.4 GHz', this.channels['2g'].length > 3,
+                                       '5g', '5 GHz', this.channels['5g'].length > 3
                                ],
                                'n': [
-                                       '11g', '2.4 GHz', this.channels['11g'].length > 3,
-                                       '11a', '5 GHz', this.channels['11a'].length > 3
+                                       '2g', '2.4 GHz', this.channels['2g'].length > 3,
+                                       '5g', '5 GHz', this.channels['5g'].length > 3
                                ],
                                'ac': [
-                                       '11a', '5 GHz', true
+                                       '5g', '5 GHz', true
                                ],
                                'ax': [
-                                       '11g', '2.4 GHz', this.channels['11g'].length > 3,
-                                       '11a', '5 GHz', this.channels['11a'].length > 3
+                                       '2g', '2.4 GHz', this.channels['2g'].length > 3,
+                                       '5g', '5 GHz', this.channels['5g'].length > 3
                                ]
                        };
                }, this));
@@ -430,7 +446,8 @@ var CBIWifiFrequencyValue = form.Value.extend({
                    bwdt = elem.querySelector('.htmode'),
                    htval = uci.get('wireless', section_id, 'htmode'),
                    hwval = uci.get('wireless', section_id, 'hwmode'),
-                   chval = uci.get('wireless', section_id, 'channel');
+                   chval = uci.get('wireless', section_id, 'channel'),
+                   bandval = uci.get('wireless', section_id, 'band');
 
                this.setValues(mode, this.modes);
 
@@ -443,15 +460,24 @@ var CBIWifiFrequencyValue = form.Value.extend({
 
                this.toggleWifiMode(elem);
 
-               if (/a/.test(hwval))
-                       band.value = '11a';
-               else
-                       band.value = '11g';
+               if (hwval != null) {
+                       this.useBandOption = false;
+
+                       if (/a/.test(hwval))
+                               band.value = '5g';
+                       else
+                               band.value = '2g';
+               }
+               else {
+                       this.useBandOption = true;
+
+                       band.value = bandval;
+               }
 
                this.toggleWifiBand(elem);
 
                bwdt.value = htval;
-               chan.value = chval;
+               chan.value = chval || chan.options[0].value;
 
                return elem;
        },
@@ -505,7 +531,7 @@ var CBIWifiFrequencyValue = form.Value.extend({
        cfgvalue: function(section_id) {
                return [
                    uci.get('wireless', section_id, 'htmode'),
-                   uci.get('wireless', section_id, 'hwmode'),
+                   uci.get('wireless', section_id, 'hwmode') || uci.get('wireless', section_id, 'band'),
                    uci.get('wireless', section_id, 'channel')
                ];
        },
@@ -522,7 +548,12 @@ var CBIWifiFrequencyValue = form.Value.extend({
 
        write: function(section_id, value) {
                uci.set('wireless', section_id, 'htmode', value[0] || null);
-               uci.set('wireless', section_id, 'hwmode', value[1]);
+
+               if (this.useBandOption)
+                       uci.set('wireless', section_id, 'band', value[1]);
+               else
+                       uci.set('wireless', section_id, 'hwmode', (value[1] == '2g') ? '11g' : '11a');
+
                uci.set('wireless', section_id, 'channel', value[2]);
        }
 });
index cb7cf8c23d91afaf69ce6d1cd4b9c6c6aa466137..0fbe49c12cd7d87cbd19516f1a6f906e95c4269f 100644 (file)
@@ -209,6 +209,8 @@ return view.extend({
                                                        y = ctx.height - Math.floor(values[i][j] * data_scale);
                                                        //y -= Math.floor(y % (1 / data_scale));
 
+                                                       y = isNaN(y) ? ctx.height : y;
+
                                                        pt += ' ' + x + ',' + y;
                                                }
 
index a87fe53fed9b82d9a576a5f77d1ec6ec9a00f8ea..168bfefdf8673d7c6cf5f585588e45999538a947 100644 (file)
@@ -281,6 +281,8 @@ return view.extend({
                                                        y = ctx.height - Math.floor(values[i][j] * data_scale);
                                                        //y -= Math.floor(y % (1 / data_scale));
 
+                                                       y = isNaN(y) ? ctx.height : y;
+
                                                        pt += ' ' + x + ',' + y;
                                                }
 
index 2766f5d1b5d9128eb46b8a733816d1b28fbb0099..633e43e6c32abc5a8a145faa1347c61f4a05fe3b 100644 (file)
@@ -186,6 +186,8 @@ return view.extend({
                                                        y = ctx.height - Math.floor(values[i][j] * data_scale);
                                                        //y -= Math.floor(y % (1 / data_scale));
 
+                                                       y = isNaN(y) ? ctx.height : y;
+
                                                        pt += ' ' + x + ',' + y;
                                                }
 
index 0fdd3d56e7151ed8bc00366855fd6d29320a662b..8848143c98b53e7bf59082027bdb25976ddffd08 100644 (file)
@@ -202,6 +202,8 @@ return view.extend({
                                                        y = ctx.height - Math.floor(values[i][j] * data_scale);
                                                        //y -= Math.floor(y % (1 / data_scale));
 
+                                                       y = isNaN(y) ? ctx.height : y;
+
                                                        pt += ' ' + x + ',' + y;
                                                }
 
index ad2d7feef59c37f9549c3a7036ddd51ca4ed53f8..81a23d63af6df8c0260ddf81ea9cd30ab75f6f38 100644 (file)
@@ -41,7 +41,7 @@
                <header>
                        <div class="fill">
                                <div class="container">
-                                       <a class="brand" href="/"><%=boardinfo.hostname or "?"%></a>
+                                       <a class="brand" href="/"><%=striptags(boardinfo.hostname or "?")%></a>
                                        <ul class="nav" id="topmenu" style="display:none"></ul>
                                        <div id="indicators" class="pull-right"></div>
                                </div>
index f81aae5ac193a097cd92f492577cc873fd76077a..8c418b6fc2683fcf4d2f5cd928f787d7d2f66680 100644 (file)
                <div class="container">
                        <span class="showSide"></span>
                        <a id="logo" href="<% if luci.dispatcher.context.authsession then %><%=url('admin/status/overview')%><% else %>#<% end %>"><img src="<%=media%>/brand.png" alt="OpenWrt"></a>
-                       <a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
+                       <a class="brand" href="#"><%=striptags(boardinfo.hostname or "?")%></a>
                        <div class="status" id="indicators">
                                <span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
                                        <span class="label success" id="xhr_poll_status_on"><span class="mobile-hide"><%:Auto Refresh%></span> <%:on%></span>
index 1cc84acbb1e0f8d2c921198380b264f4e211f823..28589ff78194bdfd80ec46a323ed78e536a647b3 100644 (file)
@@ -43,7 +43,7 @@
 <div id="menubar">
        <h2 class="navigation"><a id="navigation" name="navigation"><%:Navigation%></a></h2>
 
-       <span class="hostname"><a href="/"><%=(boardinfo.hostname or "?")%></a></span>
+       <span class="hostname"><a href="/"><%=striptags(boardinfo.hostname or "?")%></a></span>
        <span class="distversion"><%=ver.distversion%></span>
        <span id="indicators"></span>
 </div>
index 5f79b386b203022223e9f99a8da6f422347f853f..a17f3502634082e41b1a4b9233a0fc36c92af6ea 100644 (file)
@@ -50,7 +50,7 @@
 <h2 class="navigation"><a id="navigation" name="navigation"><%:Navigation%></a></h2>
 
 <div class="hostinfo">
-       <%=(boardinfo.hostname or "?")%> | <%=ver.distversion%> |
+       <%=striptags(boardinfo.hostname or "?")%> | <%=ver.distversion%> |
        <%:Load%>: <%="%.2f" % (loadinfo[1] / 65535.0)%> <%="%.2f" % (loadinfo[2] / 65535.0)%> <%="%.2f" % (loadinfo[3] / 65535.0)%>
 </div>