From: Hannu Nyman Date: Tue, 6 Mar 2018 14:31:57 +0000 (+0200) Subject: Merge pull request #1653 from guidosarducci/master-fix-apcups-statistics X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=c555814edbc934f781238ba6844e2f7e1afdc2e5;hp=fa1f4c42a6e73483d8ed6284b177e5648f44a114 Merge pull request #1653 from guidosarducci/master-fix-apcups-statistics [RFC] luci-app-statistics: only graph data supported by APC UPS --- diff --git a/applications/luci-app-adblock/po/it/adblock.po b/applications/luci-app-adblock/po/it/adblock.po index bdaa2f29a..88adcc892 100644 --- a/applications/luci-app-adblock/po/it/adblock.po +++ b/applications/luci-app-adblock/po/it/adblock.po @@ -275,7 +275,7 @@ msgid "" msgstr "" msgid "" -"Size of the download queue to handle downloads & list processing in parallel " +"Size of the download queue to handle downloads & list processing in parallel " "(default '4').
" msgstr "" diff --git a/applications/luci-app-adblock/po/ja/adblock.po b/applications/luci-app-adblock/po/ja/adblock.po index d3a0a5c82..60c5a9a54 100644 --- a/applications/luci-app-adblock/po/ja/adblock.po +++ b/applications/luci-app-adblock/po/ja/adblock.po @@ -301,7 +301,7 @@ msgstr "" "処理エラーまたはドメイン カウントが0以下の場合、メールを送信します。
" msgid "" -"Size of the download queue to handle downloads & list processing in parallel " +"Size of the download queue to handle downloads & list processing in parallel " "(default '4').
" msgstr "" "ダウンロードの制御とリストの処理を同時並行的に行うダウンロード キューのサイズ" diff --git a/applications/luci-app-adblock/po/pt-br/adblock.po b/applications/luci-app-adblock/po/pt-br/adblock.po index f264ed677..7eb6e3ebc 100644 --- a/applications/luci-app-adblock/po/pt-br/adblock.po +++ b/applications/luci-app-adblock/po/pt-br/adblock.po @@ -267,7 +267,7 @@ msgid "" msgstr "" msgid "" -"Size of the download queue to handle downloads & list processing in parallel " +"Size of the download queue to handle downloads & list processing in parallel " "(default '4').
" msgstr "" diff --git a/applications/luci-app-adblock/po/ru/adblock.po b/applications/luci-app-adblock/po/ru/adblock.po index 0898213a4..6e80e80b3 100644 --- a/applications/luci-app-adblock/po/ru/adblock.po +++ b/applications/luci-app-adblock/po/ru/adblock.po @@ -303,7 +303,7 @@ msgstr "" "≤ 0.
" msgid "" -"Size of the download queue to handle downloads & list processing in parallel " +"Size of the download queue to handle downloads & list processing in parallel " "(default '4').
" msgstr "" "Значение очереди загрузки для выполнения параллельных загрузок (по умолчанию " diff --git a/applications/luci-app-adblock/po/sv/adblock.po b/applications/luci-app-adblock/po/sv/adblock.po index 5a86d2c92..d875a69f9 100644 --- a/applications/luci-app-adblock/po/sv/adblock.po +++ b/applications/luci-app-adblock/po/sv/adblock.po @@ -256,7 +256,7 @@ msgid "" msgstr "" msgid "" -"Size of the download queue to handle downloads & list processing in parallel " +"Size of the download queue to handle downloads & list processing in parallel " "(default '4').
" msgstr "" diff --git a/applications/luci-app-adblock/po/templates/adblock.pot b/applications/luci-app-adblock/po/templates/adblock.pot index 285bb1dca..5a93f8f07 100644 --- a/applications/luci-app-adblock/po/templates/adblock.pot +++ b/applications/luci-app-adblock/po/templates/adblock.pot @@ -248,7 +248,7 @@ msgid "" msgstr "" msgid "" -"Size of the download queue to handle downloads & list processing in parallel " +"Size of the download queue to handle downloads & list processing in parallel " "(default '4').
" msgstr "" diff --git a/applications/luci-app-adblock/po/zh-cn/adblock.po b/applications/luci-app-adblock/po/zh-cn/adblock.po index 3b8a35b04..1d7dc2b19 100644 --- a/applications/luci-app-adblock/po/zh-cn/adblock.po +++ b/applications/luci-app-adblock/po/zh-cn/adblock.po @@ -266,7 +266,7 @@ msgid "" msgstr "" msgid "" -"Size of the download queue to handle downloads & list processing in parallel " +"Size of the download queue to handle downloads & list processing in parallel " "(default '4').
" msgstr "" diff --git a/applications/luci-app-adblock/po/zh-tw/adblock.po b/applications/luci-app-adblock/po/zh-tw/adblock.po index 0d1536ba8..da00842d5 100644 --- a/applications/luci-app-adblock/po/zh-tw/adblock.po +++ b/applications/luci-app-adblock/po/zh-tw/adblock.po @@ -266,7 +266,7 @@ msgid "" msgstr "" msgid "" -"Size of the download queue to handle downloads & list processing in parallel " +"Size of the download queue to handle downloads & list processing in parallel " "(default '4').
" msgstr "" diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua index 920dc6afb..4b1a070d1 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua @@ -93,7 +93,7 @@ function configCheck() local trackingNumber = uci:get("mwan3", iface, "track_ip") overview[iface]["tracking"] = 0 - if #trackingNumber > 0 then + if trackingNumber and #trackingNumber > 0 then overview[iface]["tracking"] = #trackingNumber overview[iface]["reliability"] = false local reliabilityNumber = tonumber(uci:get("mwan3", iface, "reliability")) diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm b/applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm index 6dc3d1274..86b5ac696 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm @@ -15,30 +15,27 @@ XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_ for ( var iface in status.interfaces) { var state = ''; - var css = ''; switch (status.interfaces[iface].status) { case 'online': state = '<%:Online (tracking active)%>'; - css = 'wanon'; break; case 'notMonitored': state = '<%:Online (tracking off)%>'; - css = 'wanon'; break; case 'offline': state = '<%:Offline%>'; - css = 'wanoff'; break; default: state = '<%:Disabled%>'; - css = 'wanoff'; break; } statusview += String.format( - '%s
%s
', - css, - iface, + '
Interface: %s
', + iface + ); + statusview += String.format( + '
Status: %s


', state ); } @@ -53,36 +50,8 @@ XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_ //]]>
- <%:MWAN Interface Live Status%> -
<%:Loading%><%:Collecting data...%>
+ <%:MWAN Interfaces%> +
+ <%:Loading%><%:Collecting data...%> +
- - diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm b/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm index 21e59a801..cb476967f 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm @@ -14,98 +14,7 @@ - -
-

<%:MWAN Status - Interface%>

- <%if not require("luci.sys").init.enabled("mwan3") then%> -
<%:INFO: MWAN not running%>
- <%end%> -
- <%:Collecting data...%> - - <%:Loading%> - -
-
- - +<%+mwan/overview_status_interface%> <%+footer%> diff --git a/applications/luci-app-travelmate/Makefile b/applications/luci-app-travelmate/Makefile index 6170f9d4c..2bd25bc17 100644 --- a/applications/luci-app-travelmate/Makefile +++ b/applications/luci-app-travelmate/Makefile @@ -1,11 +1,11 @@ -# Copyright 2017 Dirk Brenken (dev@brenken.org) +# Copyright 2017-2018 Dirk Brenken (dev@brenken.org) # This is free software, licensed under the Apache License, Version 2.0 # include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI support for Travelmate -LUCI_DEPENDS:=+travelmate +luci-lib-jsonc +LUCI_DEPENDS:=+travelmate +luci-lib-jsonc +qrencode LUCI_PKGARCH:=all include ../../luci.mk diff --git a/applications/luci-app-travelmate/luasrc/controller/travelmate.lua b/applications/luci-app-travelmate/luasrc/controller/travelmate.lua index 0f7583497..14b8d77ff 100644 --- a/applications/luci-app-travelmate/luasrc/controller/travelmate.lua +++ b/applications/luci-app-travelmate/luasrc/controller/travelmate.lua @@ -3,7 +3,6 @@ module("luci.controller.travelmate", package.seeall) -local fs = require("nixio.fs") local util = require("luci.util") local i18n = require("luci.i18n") local templ = require("luci.template") @@ -15,7 +14,8 @@ function index() entry({"admin", "services", "travelmate"}, firstchild(), _("Travelmate"), 40).dependent = false entry({"admin", "services", "travelmate", "tab_from_cbi"}, cbi("travelmate/overview_tab", {hideresetbtn=true, hidesavebtn=true}), _("Overview"), 10).leaf = true entry({"admin", "services", "travelmate", "stations"}, template("travelmate/stations"), _("Wireless Stations"), 20).leaf = true - entry({"admin", "services", "travelmate", "logfile"}, call("logread"), _("View Logfile"), 30).leaf = true + entry({"admin", "services", "travelmate", "apqr"}, template("travelmate/ap_qr"), _("AP QR-Codes"), 30).leaf = true + entry({"admin", "services", "travelmate", "logfile"}, call("logread"), _("View Logfile"), 40).leaf = true entry({"admin", "services", "travelmate", "advanced"}, firstchild(), _("Advanced"), 100) entry({"admin", "services", "travelmate", "advanced", "configuration"}, cbi("travelmate/configuration_tab"), _("Edit Travelmate Configuration"), 110).leaf = true entry({"admin", "services", "travelmate", "advanced", "cfg_wireless"}, cbi("travelmate/cfg_wireless_tab"), _("Edit Wireless Configuration"), 120).leaf = true diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/ap_qr.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/ap_qr.htm new file mode 100644 index 000000000..e6e4ede5a --- /dev/null +++ b/applications/luci-app-travelmate/luasrc/view/travelmate/ap_qr.htm @@ -0,0 +1,62 @@ +<%# +Copyright 2018 Dirk Brenken (dev@brenken.org) +This is free software, licensed under the Apache License, Version 2.0 +-%> + +<%+header%> + +
+
+ <%=translate("Here you'll find the QR codes from all of your configured Access Points. It allows you to connect your Android or iOS devices to your router's WiFi using the QR code shown below.")%> +
+<%- + local write = io.write + local uci = require("luci.model.uci").cursor() + + uci:foreach("wireless", "wifi-iface", function(s) + local device = s.device or "" + local mode = s.mode or "" + local ssid = s.ssid or "" + local enc = s.encryption or "" + local key = s.key or "" + local hidden = s.hidden or "false" + local disabled = s.disabled or "" + local wep_slots = {s.key1 or "", s.key2 or "", s.key3 or "", s.key4 or ""} + + if device and mode == "ap" and disabled ~= "1" then + if string.match(enc, '^psk') then + enc = "WPA" + elseif string.match(enc, '^wep') then + enc = "WEP" + if tonumber(key) then + key = wep_slots[tonumber(key)] + end + elseif enc == "none" then + enc = "nopass" + key = "nokey" + else + enc = "" + end + if hidden == "1" then + hidden = "true" + end + if ssid and enc and key then + local e_ssid = string.gsub(ssid,"[\"\\';:, ]",[[\\\%1]]) + local e_key = string.gsub(key,"[\"\\';:, ]",[[\\\%1]]) + local qrcode = "" + if nixio.fs.access("/usr/bin/qrencode") then + qrcode = luci.sys.exec("/usr/bin/qrencode -I -t SVG -8 -o - 'WIFI:S:\"'" .. e_ssid .. "'\";T:'" .. enc .. "';P:\"'" .. e_key .. "'\";H:'" .. hidden .. "';'") + end +-%> +
+ AP on <%=device%> with SSID "<%=ssid%>" +

<%=qrcode%>

+
+<%- + end + end + end) +%> +
+ +<%+footer%> diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm index a26733995..1dacb6e24 100644 --- a/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm +++ b/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm @@ -12,7 +12,6 @@ This is free software, licensed under the Apache License, Version 2.0 <%+header%>
-

<%:Wireless Stations%>

<%=translatef("Provides an overview of all configured uplinks for the travelmate interface (%s). You can edit, delete or re-order existing uplinks or scan for a new one. The currently used uplink is emphasized in blue.", trmiface)%>
diff --git a/applications/luci-app-travelmate/po/ja/travelmate.po b/applications/luci-app-travelmate/po/ja/travelmate.po index 56e3badab..30f34ef30 100644 --- a/applications/luci-app-travelmate/po/ja/travelmate.po +++ b/applications/luci-app-travelmate/po/ja/travelmate.po @@ -7,11 +7,14 @@ msgstr "" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.5\n" +"X-Generator: Poedit 2.0.6\n" "Last-Translator: INAGAKI Hiroshi \n" "Plural-Forms: nplurals=1; plural=0;\n" "Language: ja\n" +msgid "AP QR-Codes" +msgstr "AP QR-コード" + msgid "Actions" msgstr "操作" @@ -43,6 +46,16 @@ msgstr "BSSID" msgid "Back to overview" msgstr "概要へ戻る" +msgid "Captive Portal Detection" +msgstr "キャプティブポータル検知" + +msgid "" +"Check the internet availability, log captive portal redirections and keep " +"the uplink connection 'alive'." +msgstr "" +"インターネットの利用可否を確認し、キャプティブポータル リダイレクトを記録して" +"アップリンク接続を 'alive' として保持します。" + msgid "Cipher" msgstr "暗号化方式" @@ -135,13 +148,18 @@ msgid "Force a manual uplink rescan / reconnect in 'trigger' mode." msgstr "" "'trigger' モード時に、手動でアップリンクの再スキャンと再接続を行います。" -msgid "How long should travelmate wait for a successful wlan interface reload." +msgid "" +"Here you'll find the QR codes from all of your configured Access Points. It " +"allows you to connect your Android or iOS devices to your router's WiFi " +"using the QR code shown below." msgstr "" -"無線LAN インターフェースのリロードが成功するまでの、Travelmate の待機時間で" -"す。" +"ここには、構成済みの全アクセスポイントの QR コードを表示しています。以下の " +"QR コードを使用して、 Android または iOS デバイスをルータの WiFi に接続するこ" +"とができます。" -msgid "How many times should travelmate try to connect to an Uplink." -msgstr "Travelmate がアップリンクへの接続を試行する回数です。" +msgid "" +"How long should travelmate wait for a successful wlan uplink connection." +msgstr "Travelmate が無線アップリンクへの接続成功を待つ時間です。" msgid "Identity" msgstr "ID" @@ -171,6 +189,13 @@ msgstr "最終実行日時" msgid "Manual Rescan" msgstr "手動再スキャン" +msgid "" +"Minimum signal quality threshold as percent for conditional uplink (dis-) " +"connections." +msgstr "" +"条件付きアップリンク接続(または切断)のための、シグナル品質閾値の下限(%)で" +"す。" + msgid "Move down" msgstr "下へ" @@ -233,6 +258,9 @@ msgstr "再スキャン" msgid "Restrict travelmate to a dedicated radio, e.g. 'radio0'." msgstr "Travelmate が指定された無線に接続するよう制御します。(例: 'radio0')" +msgid "Retry limit to connect to an uplink." +msgstr "アップリンクへの接続を試行する回数です。" + msgid "Runtime Information" msgstr "実行情報" @@ -248,6 +276,9 @@ msgstr "保存" msgid "Scan" msgstr "スキャン:" +msgid "Signal Quality Threshold" +msgstr "シグナル品質閾値" + msgid "Signal strength" msgstr "信号強度" @@ -298,24 +329,20 @@ msgstr "" msgid "Timeout in seconds between retries in 'automatic' mode." msgstr "'automatic' モード時に接続を確認または再試行する間隔(秒)です。" -msgid "To disable this feature set it to '0' which means unlimited retries." -msgstr "" -"この機能を無効にして接続の再試行を無制限にする場合、 '0' を設定します。" - msgid "Travelmate" msgstr "Travelmate" msgid "Travelmate Logfile" msgstr "Travelmate ログファイル" -msgid "Travelmate Status" -msgstr "Travelmate ステータス" +msgid "Travelmate Status (Quality)" +msgstr "Travelmate ステータス(品質)" msgid "Travelmate Version" msgstr "Travelmate バージョン" -msgid "Trigger delay" -msgstr "トリガー遅延" +msgid "Trigger Delay" +msgstr "トリガ遅延" msgid "Unknown" msgstr "不明" @@ -365,20 +392,8 @@ msgstr "" "ファイアウォールの wan ゾーンに追加します。このステップは、一度だけ実行される" "必要があります。" -msgid "connected" -msgstr "接続済" - -msgid "error" -msgstr "エラー" - msgid "hidden" msgstr "(不明)" msgid "n/a" msgstr "利用不可" - -msgid "not connected" -msgstr "未接続" - -msgid "running" -msgstr "実行中" diff --git a/applications/luci-app-travelmate/po/pt-br/travelmate.po b/applications/luci-app-travelmate/po/pt-br/travelmate.po index cf17b024e..7cb6ac061 100644 --- a/applications/luci-app-travelmate/po/pt-br/travelmate.po +++ b/applications/luci-app-travelmate/po/pt-br/travelmate.po @@ -12,6 +12,9 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "Language: pt_BR\n" +msgid "AP QR-Codes" +msgstr "" + msgid "Actions" msgstr "" @@ -43,6 +46,14 @@ msgstr "" msgid "Back to overview" msgstr "" +msgid "Captive Portal Detection" +msgstr "" + +msgid "" +"Check the internet availability, log captive portal redirections and keep " +"the uplink connection 'alive'." +msgstr "" + msgid "Cipher" msgstr "" @@ -129,10 +140,14 @@ msgstr "" msgid "Force a manual uplink rescan / reconnect in 'trigger' mode." msgstr "" -msgid "How long should travelmate wait for a successful wlan interface reload." +msgid "" +"Here you'll find the QR codes from all of your configured Access Points. It " +"allows you to connect your Android or iOS devices to your router's WiFi " +"using the QR code shown below." msgstr "" -msgid "How many times should travelmate try to connect to an Uplink." +msgid "" +"How long should travelmate wait for a successful wlan uplink connection." msgstr "" msgid "Identity" @@ -161,6 +176,11 @@ msgstr "" msgid "Manual Rescan" msgstr "" +msgid "" +"Minimum signal quality threshold as percent for conditional uplink (dis-) " +"connections." +msgstr "" + msgid "Move down" msgstr "" @@ -219,6 +239,9 @@ msgstr "" msgid "Restrict travelmate to a dedicated radio, e.g. 'radio0'." msgstr "" +msgid "Retry limit to connect to an uplink." +msgstr "" + msgid "Runtime Information" msgstr "" @@ -234,6 +257,9 @@ msgstr "" msgid "Scan" msgstr "" +msgid "Signal Quality Threshold" +msgstr "" + msgid "Signal strength" msgstr "" @@ -274,22 +300,19 @@ msgstr "" msgid "Timeout in seconds between retries in 'automatic' mode." msgstr "" -msgid "To disable this feature set it to '0' which means unlimited retries." -msgstr "" - msgid "Travelmate" msgstr "Travelmate" msgid "Travelmate Logfile" msgstr "" -msgid "Travelmate Status" +msgid "Travelmate Status (Quality)" msgstr "" msgid "Travelmate Version" msgstr "" -msgid "Trigger delay" +msgid "Trigger Delay" msgstr "" msgid "Unknown" @@ -338,24 +361,12 @@ msgid "" "add it to the wan zone of the firewall. This step has only to be done once." msgstr "" -msgid "connected" -msgstr "" - -msgid "error" -msgstr "" - msgid "hidden" msgstr "" msgid "n/a" msgstr "" -msgid "not connected" -msgstr "" - -msgid "running" -msgstr "" - #~ msgid "" #~ "Brief advice: Create a wwan interface, configure it to use dhcp and add " #~ "it to the wan zone in firewall. Create the wifi interfaces to be used " diff --git a/applications/luci-app-travelmate/po/ru/travelmate.po b/applications/luci-app-travelmate/po/ru/travelmate.po index fe0e47647..0b04e2783 100644 --- a/applications/luci-app-travelmate/po/ru/travelmate.po +++ b/applications/luci-app-travelmate/po/ru/travelmate.po @@ -15,6 +15,9 @@ msgstr "" "Project-Info: Это технический перевод, не дословный. Главное-удобный русский " "интерфейс, все проверялось в графическом режиме, совместим с другими apps\n" +msgid "AP QR-Codes" +msgstr "" + msgid "Actions" msgstr "Действия" @@ -46,6 +49,14 @@ msgstr "BSSID" msgid "Back to overview" msgstr "Назад в меню" +msgid "Captive Portal Detection" +msgstr "" + +msgid "" +"Check the internet availability, log captive portal redirections and keep " +"the uplink connection 'alive'." +msgstr "" + msgid "Cipher" msgstr "Алгоритм шифрования" @@ -138,13 +149,15 @@ msgstr "" "Принудительно выполнить повторное сканирование/повторное подключение внешних " "сетей в режиме 'ручной'." -msgid "How long should travelmate wait for a successful wlan interface reload." +msgid "" +"Here you'll find the QR codes from all of your configured Access Points. It " +"allows you to connect your Android or iOS devices to your router's WiFi " +"using the QR code shown below." msgstr "" -"Временная задержка необходима TravelMate для полной перезагрузки wlan " -"интерфейса." -msgid "How many times should travelmate try to connect to an Uplink." -msgstr "Сколько раз TravelMate должен пытаться подключиться к сети. " +msgid "" +"How long should travelmate wait for a successful wlan uplink connection." +msgstr "" msgid "Identity" msgstr "Идентификация EAP" @@ -174,6 +187,11 @@ msgstr "Дата последнего запуска" msgid "Manual Rescan" msgstr "Поиск сети вручную" +msgid "" +"Minimum signal quality threshold as percent for conditional uplink (dis-) " +"connections." +msgstr "" + msgid "Move down" msgstr "Переместить вниз" @@ -238,6 +256,9 @@ msgstr "Пересканировать" msgid "Restrict travelmate to a dedicated radio, e.g. 'radio0'." msgstr "Выделить TravelMate-у конкретное Wi-Fi устройство, например 'radio0'." +msgid "Retry limit to connect to an uplink." +msgstr "" + msgid "Runtime Information" msgstr "Информация о состоянии" @@ -253,6 +274,9 @@ msgstr "Сохранить" msgid "Scan" msgstr "Поиск" +msgid "Signal Quality Threshold" +msgstr "" + msgid "Signal strength" msgstr "Мощность сигнала" @@ -305,25 +329,20 @@ msgstr "" "Время ожидания в секундах между повторными попытками соединения в режиме " "'автоматически'." -msgid "To disable this feature set it to '0' which means unlimited retries." -msgstr "" -"
Чтобы отключить эту функцию, установите значение '0', что означает " -"неограниченное количество попыток." - msgid "Travelmate" msgstr "TravelMate" msgid "Travelmate Logfile" msgstr "Системный журнал TravelMate" -msgid "Travelmate Status" -msgstr "Состояние Travelmate" +msgid "Travelmate Status (Quality)" +msgstr "" msgid "Travelmate Version" msgstr "Версия TravelMate" -msgid "Trigger delay" -msgstr "Задержка запуска" +msgid "Trigger Delay" +msgstr "" msgid "Unknown" msgstr "Неизвестно" @@ -371,20 +390,40 @@ msgid "" "add it to the wan zone of the firewall. This step has only to be done once." msgstr "добавить в wan зону межсетевого экрана. Можно сделать только один раз." -msgid "connected" -msgstr "подключен" - -msgid "error" -msgstr "ошибка" - msgid "hidden" msgstr "скрытый" msgid "n/a" msgstr "нет данных" -msgid "not connected" -msgstr "не подключено" +#~ msgid "" +#~ "How long should travelmate wait for a successful wlan interface reload." +#~ msgstr "" +#~ "Временная задержка необходима TravelMate для полной перезагрузки wlan " +#~ "интерфейса." + +#~ msgid "How many times should travelmate try to connect to an Uplink." +#~ msgstr "Сколько раз TravelMate должен пытаться подключиться к сети. " + +#~ msgid "To disable this feature set it to '0' which means unlimited retries." +#~ msgstr "" +#~ "
Чтобы отключить эту функцию, установите значение '0', что означает " +#~ "неограниченное количество попыток." + +#~ msgid "Travelmate Status" +#~ msgstr "Состояние Travelmate" + +#~ msgid "Trigger delay" +#~ msgstr "Задержка запуска" + +#~ msgid "connected" +#~ msgstr "подключен" + +#~ msgid "error" +#~ msgstr "ошибка" + +#~ msgid "not connected" +#~ msgstr "не подключено" -msgid "running" -msgstr "работает" +#~ msgid "running" +#~ msgstr "работает" diff --git a/applications/luci-app-travelmate/po/templates/travelmate.pot b/applications/luci-app-travelmate/po/templates/travelmate.pot index aeefa491d..e27c61a9d 100644 --- a/applications/luci-app-travelmate/po/templates/travelmate.pot +++ b/applications/luci-app-travelmate/po/templates/travelmate.pot @@ -1,6 +1,9 @@ msgid "" msgstr "Content-Type: text/plain; charset=UTF-8" +msgid "AP QR-Codes" +msgstr "" + msgid "Actions" msgstr "" @@ -32,6 +35,14 @@ msgstr "" msgid "Back to overview" msgstr "" +msgid "Captive Portal Detection" +msgstr "" + +msgid "" +"Check the internet availability, log captive portal redirections and keep " +"the uplink connection 'alive'." +msgstr "" + msgid "Cipher" msgstr "" @@ -118,10 +129,14 @@ msgstr "" msgid "Force a manual uplink rescan / reconnect in 'trigger' mode." msgstr "" -msgid "How long should travelmate wait for a successful wlan interface reload." +msgid "" +"Here you'll find the QR codes from all of your configured Access Points. It " +"allows you to connect your Android or iOS devices to your router's WiFi " +"using the QR code shown below." msgstr "" -msgid "How many times should travelmate try to connect to an Uplink." +msgid "" +"How long should travelmate wait for a successful wlan uplink connection." msgstr "" msgid "Identity" @@ -150,6 +165,11 @@ msgstr "" msgid "Manual Rescan" msgstr "" +msgid "" +"Minimum signal quality threshold as percent for conditional uplink (dis-) " +"connections." +msgstr "" + msgid "Move down" msgstr "" @@ -208,6 +228,9 @@ msgstr "" msgid "Restrict travelmate to a dedicated radio, e.g. 'radio0'." msgstr "" +msgid "Retry limit to connect to an uplink." +msgstr "" + msgid "Runtime Information" msgstr "" @@ -223,6 +246,9 @@ msgstr "" msgid "Scan" msgstr "" +msgid "Signal Quality Threshold" +msgstr "" + msgid "Signal strength" msgstr "" @@ -263,22 +289,19 @@ msgstr "" msgid "Timeout in seconds between retries in 'automatic' mode." msgstr "" -msgid "To disable this feature set it to '0' which means unlimited retries." -msgstr "" - msgid "Travelmate" msgstr "" msgid "Travelmate Logfile" msgstr "" -msgid "Travelmate Status" +msgid "Travelmate Status (Quality)" msgstr "" msgid "Travelmate Version" msgstr "" -msgid "Trigger delay" +msgid "Trigger Delay" msgstr "" msgid "Unknown" @@ -327,20 +350,8 @@ msgid "" "add it to the wan zone of the firewall. This step has only to be done once." msgstr "" -msgid "connected" -msgstr "" - -msgid "error" -msgstr "" - msgid "hidden" msgstr "" msgid "n/a" msgstr "" - -msgid "not connected" -msgstr "" - -msgid "running" -msgstr "" diff --git a/modules/luci-base/luasrc/model/network.lua b/modules/luci-base/luasrc/model/network.lua index 9ea8e369d..c8ec5364e 100644 --- a/modules/luci-base/luasrc/model/network.lua +++ b/modules/luci-base/luasrc/model/network.lua @@ -543,6 +543,9 @@ end function del_network(self, n) local r = _uci:delete("network", n) if r then + _uci:delete_all("luci", "ifstate", + function(s) return (s.interface == n) end) + _uci:delete_all("network", "alias", function(s) return (s.interface == n) end) @@ -998,7 +1001,10 @@ function protocol.ip6addrs(self) if type(addrs) == "table" then for n, addr in ipairs(addrs) do - if type(addr["local-address"]) == "table" then + if type(addr["local-address"]) == "table" and + type(addr["local-address"].mask) == "number" and + type(addr["local-address"].address) == "string" + then rv[#rv+1] = "%s/%d" %{ addr["local-address"].address, addr["local-address"].mask diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua index 4fc71cefa..8e7a3b066 100644 --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua @@ -16,6 +16,7 @@ local has_firewall = fs.access("/etc/config/firewall") m = Map("network", translate("Interfaces") .. " - " .. arg[1]:upper(), translate("On this page you can configure the network interfaces. You can bridge several interfaces by ticking the \"bridge interfaces\" field and enter the names of several network interfaces separated by spaces. You can also use VLAN notation INTERFACE.VLANNR (e.g.: eth0.1).")) m.redirect = luci.dispatcher.build_url("admin", "network", "network") m:chain("wireless") +m:chain("luci") if has_firewall then m:chain("firewall") @@ -27,18 +28,52 @@ fw.init(m.uci) local net = nw:get_network(arg[1]) +local function set_ifstate(name, option, value) + local found = false + + m.uci:foreach("luci", "ifstate", function (s) + if s.interface == name then + m.uci:set("luci", s[".name"], option, value) + found = true + return false + end + end) + + if not found then + local sid = m.uci:add("luci", "ifstate") + m.uci:set("luci", sid, "interface", name) + m.uci:set("luci", sid, option, value) + end + + m.uci:save("luci") +end + +local function get_ifstate(name, option) + local val + + m.uci:foreach("luci", "ifstate", function (s) + if s.interface == name then + val = m.uci:get("luci", s[".name"], option) + return false + end + end) + + return val +end + local function backup_ifnames(is_bridge) - if not net:is_floating() and not m:get(net:name(), "_orig_ifname") then + if not net:is_floating() and not get_ifstate(net:name(), "ifname") then local ifcs = net:get_interfaces() or { net:get_interface() } if ifcs then local _, ifn local ifns = { } for _, ifn in ipairs(ifcs) do - ifns[#ifns+1] = ifn:name() + local wif = ifn:get_wifinet() + ifns[#ifns+1] = wif and wif:id() or ifn:name() end if #ifns > 0 then - m:set(net:name(), "_orig_ifname", table.concat(ifns, " ")) - m:set(net:name(), "_orig_bridge", tostring(net:is_bridge())) + set_ifstate(net:name(), "ifname", table.concat(ifns, " ")) + set_ifstate(net:name(), "bridge", tostring(net:is_bridge())) end end end @@ -84,10 +119,10 @@ if m:formvalue("cbid.network.%s._switch" % net:name()) then elseif net:is_floating() and not proto:is_floating() then -- if we have backup data, then re-add all orphaned interfaces -- from it and restore the bridge choice - local br = (m:get(net:name(), "_orig_bridge") == "true") + local br = (get_ifstate(net:name(), "bridge") == "true") local ifn local ifns = { } - for ifn in ut.imatch(m:get(net:name(), "_orig_ifname")) do + for ifn in ut.imatch(get_ifstate(net:name(), "ifname")) do ifn = nw:get_interface(ifn) if ifn and not ifn:get_network() then proto:add_interface(ifn) @@ -114,9 +149,7 @@ if m:formvalue("cbid.network.%s._switch" % net:name()) then for k, v in pairs(m:get(net:name())) do if k:sub(1,1) ~= "." and k ~= "type" and - k ~= "ifname" and - k ~= "_orig_ifname" and - k ~= "_orig_bridge" + k ~= "ifname" then m:del(net:name(), k) end