diff options
7 files changed, 47 insertions, 35 deletions
diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua index c8f6104ea1..e70664d35c 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua @@ -234,13 +234,12 @@ up:value("8") up:value("9") up:value("10") -flush = mwan_interface:option(ListValue, "flush_conntrack", translate("Flush conntrack table"), +flush = mwan_interface:option(StaticList, "flush_conntrack", translate("Flush conntrack table"), translate("Flush global firewall conntrack table on interface events")) -flush.default = "never" -flush:value("ifup", translate("ifup")) -flush:value("ifdown", translate("ifdown")) -flush:value("never", translate("never")) -flush:value("always", translate("always")) +flush:value("ifup", translate("ifup (netifd)")) +flush:value("ifdown", translate("ifdown (netifd)")) +flush:value("connected", translate("connected (mwan3)")) +flush:value("disconnected", translate("disconnected (mwan3)")) metric = mwan_interface:option(DummyValue, "metric", translate("Metric"), translate("This displays the metric assigned to this interface in /etc/config/network")) diff --git a/contrib/package/lucihttp/Makefile b/contrib/package/lucihttp/Makefile index fd448e0fcd..619c04c2cd 100644 --- a/contrib/package/lucihttp/Makefile +++ b/contrib/package/lucihttp/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/jow-/lucihttp.git -PKG_SOURCE_DATE:=2019-01-24 -PKG_SOURCE_VERSION:=1afbdcc31016fac9e85285d032d27184db884bfd -PKG_MIRROR_HASH:=7fe11f0e0cb6dc810a47c708d38865124324660a8986305d299f5b8d771fc5e9 +PKG_SOURCE_DATE:=2019-06-05 +PKG_SOURCE_VERSION:=91c01c3c9f48dc148defbee2f694b0599d5eb3c4 +PKG_MIRROR_HASH:=07af44f6c26e706bcb8d4d652a2060455ede8fa55925f377d7c7f429ca9d7aa3 CMAKE_INSTALL:=1 PKG_LICENSE:=ISC diff --git a/modules/luci-base/luasrc/tools/status.lua b/modules/luci-base/luasrc/tools/status.lua index 496b7b9fd0..e4bc4451a2 100644 --- a/modules/luci-base/luasrc/tools/status.lua +++ b/modules/luci-base/luasrc/tools/status.lua @@ -92,7 +92,7 @@ local function dhcp_leases_common(family) local _, lease local hosts = sys.net.host_hints() for _, lease in ipairs(rv) do - local mac = duid_to_mac(lease.duid) + local mac = sys.net.duid_to_mac(lease.duid) local host = mac and hosts[mac] if host then if not lease.name then diff --git a/modules/luci-base/po/ru/base.po b/modules/luci-base/po/ru/base.po index 4a5cf2fdd4..5f86d2f6fa 100644 --- a/modules/luci-base/po/ru/base.po +++ b/modules/luci-base/po/ru/base.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: LuCI: base\n" "POT-Creation-Date: 2010-05-09 01:01+0300\n" -"PO-Revision-Date: 2019-01-15 06:45+0300\n" +"PO-Revision-Date: 2019-06-05 21:31+0300\n" "Last-Translator: Anton Kikin <a.kikin@tano-systems.com>\n" "Language-Team: http://cyber-place.ru\n" "Language: ru\n" @@ -95,6 +95,8 @@ msgstr "-- сделайте выбор --" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:382 msgid "0 = not using RSSI threshold, 1 = do not change driver default" msgstr "" +"0 = не использовать порог RSSI, 1 = не изменять значение по умолчанию " +"драйвера" #: modules/luci-mod-status/luasrc/view/admin_status/load.htm:252 msgid "1 Minute Load:" @@ -412,7 +414,7 @@ msgstr "Управление" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/system.lua:25 msgid "Advanced" -msgstr "" +msgstr "Дополнительные" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/dhcp.lua:22 #: modules/luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua:189 @@ -1253,15 +1255,15 @@ msgstr "" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:799 msgid "DAE-Client" -msgstr "DAE-Клиент" +msgstr "DAE-клиент" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:807 msgid "DAE-Port" -msgstr "DAE-Порт" +msgstr "DAE-порт" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:815 msgid "DAE-Secret" -msgstr "DAE-Секрет" +msgstr "DAE-секрет" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua:448 #: modules/luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua:459 @@ -2596,7 +2598,7 @@ msgstr "Информация" #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/network.js:105 msgid "Information" -msgstr "" +msgstr "Информация" #: protocols/luci-proto-ncm/luasrc/model/network/proto_ncm.lua:67 msgid "Initialization failure" @@ -2748,7 +2750,7 @@ msgstr "Ключ №%d" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/system.lua:70 msgid "KiB" -msgstr "" +msgstr "КиБ" #: modules/luci-mod-status/luasrc/model/cbi/admin_status/processes.lua:28 msgid "Kill" @@ -3175,7 +3177,7 @@ msgstr "Мбит/с" #: modules/luci-mod-system/luasrc/view/admin_system/password.htm:18 msgid "Medium" -msgstr "" +msgstr "Средняя" #: modules/luci-mod-status/luasrc/view/admin_status/index/20-memory.htm:13 msgid "Memory" @@ -3254,7 +3256,7 @@ msgstr "Монитор" #: modules/luci-mod-system/luasrc/view/admin_system/password.htm:14 msgid "More Characters" -msgstr "" +msgstr "Слишком мало символов" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/fstab/mount.lua:45 msgid "Mount Entry" @@ -3509,7 +3511,7 @@ msgstr "Не подключено" #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/network.js:105 msgid "Not started on boot" -msgstr "" +msgstr "Не запускается при загрузке" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/iface_add.lua:26 msgid "Note: interface name length" @@ -3873,7 +3875,7 @@ msgstr "Пароль к внутреннему Приватному ключу" #: modules/luci-mod-system/luasrc/view/admin_system/password.htm:18 #: modules/luci-mod-system/luasrc/view/admin_system/password.htm:20 msgid "Password strength" -msgstr "" +msgstr "Сложность пароля" #: protocols/luci-proto-openconnect/luasrc/model/cbi/admin_network/proto_openconnect.lua:44 msgid "Password2" @@ -3885,11 +3887,11 @@ msgstr "Перетащите файл SSH ключа или вставьте с #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:1000 msgid "Path to CA-Certificate" -msgstr "Путь к CA-Сертификату" +msgstr "Путь к CA-сертификату" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:1007 msgid "Path to Client-Certificate" -msgstr "Путь к Client-Сертификату" +msgstr "Путь к Client-сертификату" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:1013 msgid "Path to Private Key" @@ -3897,11 +3899,11 @@ msgstr "Путь к Приватному ключу" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:1049 msgid "Path to inner CA-Certificate" -msgstr "Путь к внутренним CA-Сертификатам" +msgstr "Путь к внутренним CA-сертификатам" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:1055 msgid "Path to inner Client-Certificate" -msgstr "Путь к внутренним Client-Сертификатам" +msgstr "Путь к внутренним Client-сертификатам" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:1061 msgid "Path to inner Private Key" @@ -3983,11 +3985,11 @@ msgstr "Политика" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/system.lua:178 msgid "Polling interval" -msgstr "" +msgstr "Интервал автообновления" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/system.lua:179 msgid "Polling interval for status queries in seconds" -msgstr "" +msgstr "Интервал автоматического обновления состояния страниц в секундах" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/dropbear.lua:22 msgid "Port" @@ -4145,7 +4147,7 @@ msgstr "RFC3947 NAT-T режим" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:381 msgid "RSSI threshold for joining" -msgstr "" +msgstr "Порог RSSI для присоединения" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:256 #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:597 @@ -4899,7 +4901,7 @@ msgstr "Строгий порядок" #: modules/luci-mod-system/luasrc/view/admin_system/password.htm:16 msgid "Strong" -msgstr "" +msgstr "Сильная" #: modules/luci-base/luasrc/view/cbi/simpleform.htm:61 msgid "Submit" @@ -4963,7 +4965,7 @@ msgstr "Активность порта коммутатора (%s)" #: modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm:53 msgid "Sync with NTP-Server" -msgstr "" +msgstr "Синхронизировать с NTP-сервером" #: modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm:25 #: modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm:50 @@ -5897,7 +5899,7 @@ msgstr "" #: modules/luci-mod-system/luasrc/view/admin_system/password.htm:20 msgid "Weak" -msgstr "" +msgstr "Слабая" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:946 msgid "" diff --git a/modules/luci-mod-system/luasrc/model/cbi/admin_system/backupfiles.lua b/modules/luci-mod-system/luasrc/model/cbi/admin_system/backupfiles.lua index ee2401e93d..c81466c874 100644 --- a/modules/luci-mod-system/luasrc/model/cbi/admin_system/backupfiles.lua +++ b/modules/luci-mod-system/luasrc/model/cbi/admin_system/backupfiles.lua @@ -20,7 +20,8 @@ if luci.http.formvalue("display") ~= "list" then l.inputstyle = "apply" c = f:option(TextValue, "_custom") - c.rmempty = false + c.forcewrite = true + c.rmempty = true c.cols = 70 c.rows = 30 @@ -28,9 +29,15 @@ if luci.http.formvalue("display") ~= "list" then return nixio.fs.readfile("/etc/sysupgrade.conf") end - c.write = function(self, section, value) - value = value:gsub("\r\n?", "\n") - return nixio.fs.writefile("/etc/sysupgrade.conf", value) + m.handle = function(self, state, data) + if state == FORM_VALID then + if data._custom then + nixio.fs.writefile("/etc/sysupgrade.conf", data._custom:gsub("\r\n", "\n")) + else + nixio.fs.writefile("/etc/sysupgrade.conf", "") + end + end + return true end else m.submit = false diff --git a/modules/luci-mod-system/luasrc/model/cbi/admin_system/crontab.lua b/modules/luci-mod-system/luasrc/model/cbi/admin_system/crontab.lua index 016a6199aa..beb24e7cae 100644 --- a/modules/luci-mod-system/luasrc/model/cbi/admin_system/crontab.lua +++ b/modules/luci-mod-system/luasrc/model/cbi/admin_system/crontab.lua @@ -11,6 +11,7 @@ f = SimpleForm("crontab", translate("Scheduled Tasks"), "crontab file was empty before editing.")) t = f:field(TextValue, "crons") +f.forcewrite = true t.rmempty = true t.rows = 10 function t.cfgvalue() diff --git a/modules/luci-mod-system/luasrc/model/cbi/admin_system/startup.lua b/modules/luci-mod-system/luasrc/model/cbi/admin_system/startup.lua index 9e19ac50a2..c3f14540e3 100644 --- a/modules/luci-mod-system/luasrc/model/cbi/admin_system/startup.lua +++ b/modules/luci-mod-system/luasrc/model/cbi/admin_system/startup.lua @@ -78,6 +78,7 @@ f = SimpleForm("rc", translate("Local Startup"), translate("This is the content of /etc/rc.local. Insert your own commands here (in front of 'exit 0') to execute them at the end of the boot process.")) t = f:field(TextValue, "rcs") +t.forcewrite = true t.rmempty = true t.rows = 20 @@ -89,6 +90,8 @@ function f.handle(self, state, data) if state == FORM_VALID then if data.rcs then fs.writefile("/etc/rc.local", data.rcs:gsub("\r\n", "\n")) + else + fs.writefile("/etc/rc.local", "") end end return true |