diff options
4 files changed, 628 insertions, 26 deletions
diff --git a/applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua b/applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua index f7e399352f..637eb11736 100644 --- a/applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua +++ b/applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua @@ -17,30 +17,29 @@ function index() end function _action_rate(rv, n) - local has_ipv6 = nixio.fs.access("/proc/net/ipv6_route") - if has_ipv6 then - local c = io.popen("nft list chain inet nft-qos-monitor " .. n .. " 2>/dev/null") - else - local c = io.popen("nft list chain ip nft-qos-monitor " .. n .. " 2>/dev/null") - end + local c = nixio.fs.access("/proc/net/ipv6_route") and + io.popen("nft list chain inet nft-qos-monitor " .. n .. " 2>/dev/null") or + io.popen("nft list chain ip nft-qos-monitor " .. n .. " 2>/dev/null") + if c then for l in c:lines() do - local _, i, p, b = l:match('^%s+ip ([^%s]+) ([^%s]+) counter packets (%d+) bytes (%d+)') + local _, i, p, b = l:match( + '^%s+ip ([^%s]+) ([^%s]+) counter packets (%d+) bytes (%d+)' + ) if i and p and b then -- handle expression - local r = { + rv[#rv + 1] = { rule = { - family = "inet", - table = "nft-qos-monitor", - chain = n, - handle = 0, - expr = { + family = "inet", + table = "nft-qos-monitor", + chain = n, + handle = 0, + expr = { { match = { right = i } }, { counter = { packets = p, bytes = b } } } } } - rv[#rv + 1] = r end end c:close() diff --git a/applications/luci-app-nut/po/templates/nut.pot b/applications/luci-app-nut/po/templates/nut.pot new file mode 100644 index 0000000000..945c31ddab --- /dev/null +++ b/applications/luci-app-nut/po/templates/nut.pot @@ -0,0 +1,588 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:216 +msgid "Additional Shutdown Time(s)" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:37 +msgid "Addresses on which to listen" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:23 +msgid "Allowed actions" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_cgi.lua:20 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:188 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:217 +msgid "As configured by NUT" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:150 +msgid "Bytes to read from interrupt pipe" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:174 +msgid "CA Certificate path" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:73 +msgid "Certificate file (SSL)" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:63 +msgid "Communications lost message" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:60 +msgid "Communications restored message" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_cgi.lua:35 +msgid "Control UPS via CGI" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:43 +msgid "Deadtime" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:87 +msgid "Default for UPSes without this field." +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:177 +msgid "Delay for kill power command" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:181 +msgid "Delay to power on UPS if power returns after kill power" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:129 +msgid "Description (Display)" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_cgi.lua:32 +msgid "Display name" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:169 +msgid "Don't lock port when starting driver" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:132 +msgid "Driver" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:114 +msgid "Driver Configuration" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:77 +msgid "Driver Global Settings" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:83 +msgid "Driver Path" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:212 +msgid "Driver Shutdown Order" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:106 +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:244 +msgid "Driver waits for data to be consumed by upsd before publishing more." +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:59 +msgid "Drop privileges to this user" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_cgi.lua:40 +msgid "Enable" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:138 +msgid "" +"Enables a hotplug script that makes all ttyUSB devices (e.g. serial USB) " +"group read-write as user 'nut'" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:93 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:102 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:110 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:118 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:126 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:134 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:142 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:150 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:158 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:166 +msgid "Execute notify command" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:26 +msgid "Forced Shutdown" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:57 +msgid "Forced shutdown message" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:10 +msgid "Global Settings" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_cgi.lua:13 +msgid "Go to NUT CGI" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_cgi.lua:16 +msgid "Host" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_cgi.lua:23 +msgid "Hostname or IP address" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:191 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:220 +msgid "Hostname or address of UPS" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:39 +msgid "Hot Sync" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:41 +msgid "IP Address" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:95 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:104 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:112 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:120 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:128 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:136 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:144 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:152 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:160 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:168 +msgid "Ignore" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:142 +msgid "Ignore Low Battery" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:29 +msgid "Instant commands" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:146 +msgid "Interrupt Only" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:150 +msgid "Interrupt Size" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:54 +msgid "Low battery message" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:163 +msgid "Manufacturer (Display)" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:34 +msgid "Master" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:154 +msgid "Max USB HID Length Reported" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:54 +msgid "Maximum Age of Data" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:87 +msgid "Maximum Start Delay" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:67 +msgid "Maximum connections" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:91 +msgid "Maximum number of times to try starting a driver." +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:101 +msgid "Maximum time in seconds between refresh of UPS status" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:91 +msgid "Maxium Retries" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:158 +msgid "Maxium Start Delay" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:17 +msgid "Minimum required number or power supplies" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:166 +msgid "Model (Display)" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_cgi.lua:9 +msgid "NUT CGI Access" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:12 +msgid "NUT Users" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:188 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:217 +msgid "Name of UPS" +msgstr "" + +#: applications/luci-app-nut/luasrc/controller/nut.lua:11 +msgid "Network UPS Tools" +msgstr "" + +#: applications/luci-app-nut/luasrc/controller/nut.lua:22 +#: applications/luci-app-nut/luasrc/model/cbi/nut_cgi.lua:6 +msgid "Network UPS Tools (CGI)" +msgstr "" + +#: applications/luci-app-nut/luasrc/controller/nut.lua:18 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:7 +msgid "Network UPS Tools (Monitor)" +msgstr "" + +#: applications/luci-app-nut/luasrc/controller/nut.lua:14 +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:9 +msgid "Network UPS Tools (Server)" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_cgi.lua:7 +msgid "Network UPS Tools CGI Configuration" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:8 +msgid "Network UPS Tools Monitoring Configuration" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:10 +msgid "Network UPS Tools Server Configuration" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:169 +msgid "No Lock" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:72 +msgid "No communications message" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:173 +msgid "No low/high voltage transfer OIDs" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:75 +msgid "No parent message" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:90 +msgid "Notification defaults" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:26 +msgid "Notify command" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:99 +msgid "Notify when back online" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:163 +msgid "Notify when battery needs replacing" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:147 +msgid "Notify when communications lost" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:139 +msgid "Notify when communications restored" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:131 +msgid "Notify when force shutdown" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:115 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:123 +msgid "Notify when low battery" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:107 +msgid "Notify when on battery" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:155 +msgid "Notify when shutting down" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:177 +msgid "Off Delay(s)" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:181 +msgid "On Delay(s)" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:51 +msgid "On battery message" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:48 +msgid "Online message" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:208 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:237 +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:19 +msgid "Password" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:174 +msgid "Path containing ca certificates to match against host certificate" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:83 +msgid "Path to drivers (instead of default)" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:63 +msgid "Path to state file" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:54 +msgid "Period after which data is considered stale" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:101 +msgid "Poll Interval" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:29 +msgid "Poll frequency" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:34 +msgid "Poll frequency alert" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:197 +msgid "Polling Frequency(s)" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_cgi.lua:27 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:195 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:224 +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:46 +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:202 +msgid "Port" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:200 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:229 +msgid "Power value" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:206 +msgid "Product (regex)" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:69 +msgid "Replace battery message" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:178 +msgid "Require SSL and make sure server CN matches hostname" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:96 +msgid "Retry Delay" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:32 +msgid "Role" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:80 +msgid "Run drivers in a chroot(2) environment" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:14 +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:59 +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:110 +msgid "RunAs User" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:125 +msgid "SNMP Community" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:222 +msgid "SNMP retries" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:226 +msgid "SNMP timeout(s)" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:230 +msgid "SNMP version" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:232 +msgid "SNMPv1" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:233 +msgid "SNMPv2c" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:234 +msgid "SNMPv3" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:219 +msgid "Serial Number" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:138 +msgid "Set USB serial port permissions" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:25 +msgid "Set variables" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:22 +msgid "Shutdown command" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:66 +msgid "Shutdown message" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:33 +msgid "Slave" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:106 +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:244 +msgid "Synchronous Communication" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:115 +msgid "The name of this section will be used as UPS name elsewhere" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:96 +msgid "Time in seconds between driver start retry attempts." +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:158 +msgid "Time in seconds that upsdrvctl will wait for driver to finish starting" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:183 +msgid "UPS Master" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:51 +msgid "UPS Server Global Settings" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:212 +msgid "UPS Slave" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_cgi.lua:20 +msgid "UPS name" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:121 +msgid "USB Bus(es) (regex)" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:209 +msgid "USB Product Id" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:241 +msgid "USB Vendor Id" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:29 +msgid "" +"Use upscmd -l to see full list which the commands your UPS supports " +"(requires upscmd package)" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:110 +msgid "" +"User as which to execute driver; requires device file accessed by driver to " +"be read-write for that user." +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:205 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:234 +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:16 +msgid "Username" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:238 +msgid "Vendor (regex)" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:178 +msgid "Verify all connection with SSL" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:154 +msgid "Workaround for buggy firmware" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:94 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:103 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:111 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:119 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:127 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:135 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:143 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:151 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:159 +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:167 +msgid "Write to syslog" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_server.lua:80 +msgid "chroot" +msgstr "" + +#: applications/luci-app-nut/luasrc/model/cbi/nut_monitor.lua:14 +msgid "upsmon drops privileges to this user" +msgstr "" diff --git a/applications/luci-app-unbound/luasrc/controller/unbound.lua b/applications/luci-app-unbound/luasrc/controller/unbound.lua index 5e19621842..32879cb9f2 100644 --- a/applications/luci-app-unbound/luasrc/controller/unbound.lua +++ b/applications/luci-app-unbound/luasrc/controller/unbound.lua @@ -53,7 +53,7 @@ function index() call("QueryLocalZone"), _("Local Zones"), 30).leaf = true entry({"admin", "services", "unbound", "status", "dumpcache"}, - call("QueryCacheDump"), _("Cache Dump"), 40).leaf = true + call("QueryDumpCache"), _("DNS Cache"), 40).leaf = true else entry({"admin", "services", "unbound", "status", "statistics"}, call("ShowEmpty"), _("Statistics"), 10).leaf = true @@ -153,17 +153,33 @@ function QueryLocalZone() {heading = "", description = lcldesc, content = lcldata}) end -function QueryCacheDump() + +function QueryDumpCache() + local tp = require "luci.template" + local tr = require "luci.i18n" + local lcldesc local lcldata = luci.util.exec( "unbound-control -c /var/lib/unbound/unbound.conf dump_cache") - local lcldesc = luci.i18n.translate( - "This shows Unbound 'cache_dump'. Useful to check if unbound is actually caching dns entities.") - luci.template.render("unbound/show-textbox", - {heading = "", description = lcldesc, content = lcldata}) + if #lcldata > 262144 then + lcldesc = tr.translate( + "Unbound cache is too large to display in LuCI.") + + tp.render("unbound/show-empty", + {heading = "", description = lcldesc}) + + else + lcldesc = tr.translate( + "This shows 'ubound-control dump_cache' for auditing records including DNSSEC.") + + tp.render("unbound/show-textbox", + {heading = "", description = lcldesc, content = lcldata}) + end + end + function ShowUnboundConf() local unboundfile = "/var/lib/unbound/unbound.conf" local lcldata = nixio.fs.readfile(unboundfile) @@ -196,7 +212,7 @@ function ShowAdblock() if fs.stat(adblockfile).size > 262144 then lcldesc = tr.translate( - "Adblock domain list '" .. adblockfile .. "' is too large for LuCI.") + "Adblock domain list is too large to display in LuCI.") tp.render("unbound/show-empty", {heading = "", description = lcldesc}) diff --git a/modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua b/modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua index c6f4477dff..39fd4a3c89 100644 --- a/modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua +++ b/modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua @@ -16,14 +16,12 @@ TZ = { { 'Africa/Brazzaville', 'WAT-1' }, { 'Africa/Bujumbura', 'CAT-2' }, { 'Africa/Cairo', 'EET-2' }, - { 'Africa/Casablanca', '<+01>-1' }, { 'Africa/Ceuta', 'CET-1CEST,M3.5.0,M10.5.0/3' }, { 'Africa/Conakry', 'GMT0' }, { 'Africa/Dakar', 'GMT0' }, { 'Africa/Dar es Salaam', 'EAT-3' }, { 'Africa/Djibouti', 'EAT-3' }, { 'Africa/Douala', 'WAT-1' }, - { 'Africa/El Aaiun', '<+01>-1' }, { 'Africa/Freetown', 'GMT0' }, { 'Africa/Gaborone', 'CAT-2' }, { 'Africa/Harare', 'CAT-2' }, @@ -51,7 +49,7 @@ TZ = { { 'Africa/Nouakchott', 'GMT0' }, { 'Africa/Ouagadougou', 'GMT0' }, { 'Africa/Porto-Novo', 'WAT-1' }, - { 'Africa/Sao Tome', 'WAT-1' }, + { 'Africa/Sao Tome', 'GMT0' }, { 'Africa/Tripoli', 'EET-2' }, { 'Africa/Tunis', 'CET-1' }, { 'Africa/Windhoek', 'CAT-2' }, @@ -272,7 +270,8 @@ TZ = { { 'Asia/Pontianak', 'WIB-7' }, { 'Asia/Pyongyang', 'KST-9' }, { 'Asia/Qatar', '<+03>-3' }, - { 'Asia/Qyzylorda', '<+06>-6' }, + { 'Asia/Qostanay', '<+06>-6' }, + { 'Asia/Qyzylorda', '<+05>-5' }, { 'Asia/Riyadh', '<+03>-3' }, { 'Asia/Sakhalin', '<+11>-11' }, { 'Asia/Samarkand', '<+05>-5' }, @@ -283,7 +282,7 @@ TZ = { { 'Asia/Taipei', 'CST-8' }, { 'Asia/Tashkent', '<+05>-5' }, { 'Asia/Tbilisi', '<+04>-4' }, - { 'Asia/Tehran', '<+0330>-3:30<+0430>,J80/0,J264/0' }, + { 'Asia/Tehran', '<+0330>-3:30<+0430>,J79/24,J263/24' }, { 'Asia/Thimphu', '<+06>-6' }, { 'Asia/Tokyo', 'JST-9' }, { 'Asia/Tomsk', '<+07>-7' }, |