Commit graph

12031 commits

Author SHA1 Message Date
Jo-Philipp Wich
84e23d96b4 luci-mod-network: handle missing switch port state information
Ref: https://github.com/openwrt/luci/issues/3565
Ref: https://forum.openwrt.org/t/cannot-read-property-link/50766
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 616d44c155)
2020-01-29 09:19:28 +01:00
Jo-Philipp Wich
42004be7dd treewide: sync and merge master translations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-29 08:47:34 +01:00
Jo-Philipp Wich
ea3624bee9 build: add script to merge master translation into branches
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit cab574958c)
2020-01-29 08:40:39 +01:00
Jo-Philipp Wich
529d6b7268 build: i18n-scan.pl: use xgettext to extract message strings
Using xgettext has a few benefits compared to the previous perl extraction
approach. The xgettext utility is able to properly distinguish commented
from uncommented code and it is able handle concatenated constant
expressions such as `_("Some " + "string")`.

A further benefit is the ability to extract translations with disambiguation
contexts and plural translation calls.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 901a0821f6)
2020-01-29 08:33:37 +01:00
Jo-Philipp Wich
e578ff9b1c build: i18n-scan.pl: support extracting translations from menu json
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9f9358c3e2)
2020-01-29 08:33:34 +01:00
Jo-Philipp Wich
3f1784fba7 luci-proto-openconnect: explicitely escape slashes in regex literals
The unespaced slashes confuse xgettext and likely other source
scanners as well.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c43fa199bf)
2020-01-29 08:30:51 +01:00
Jo-Philipp Wich
c1405dd9c3 luci-proto-wireguard: explicitely escape slashes in regex literals
The unespaced slashes confuse xgettext and likely other source
scanners as well.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f1c89c103b)
2020-01-29 08:30:51 +01:00
Jo-Philipp Wich
02b0c51844 luci-app-firewall: fix variable clash leading to incorrect family display
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9fd7e9fc23)
2020-01-28 18:34:41 +01:00
Jo-Philipp Wich
a2e9e45c6d luci-app-firewall: add SNAT config migration
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit f1771d14aa)
2020-01-28 18:34:34 +01:00
Jo-Philipp Wich
03a8ea4edb luci-app-firewall: rework rule descriptions, deduplicate code
Use a simple custom format string DSL to assemble the rule description
texts in the overview page.

Also move common code for shared, complex cbi options to the firewall
tool class.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 7944b0a90b)
2020-01-28 18:34:01 +01:00
Jo-Philipp Wich
3b60ada020 luci-app-firewall: consolidate duplicate option code
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 0608ff09f8)
2020-01-28 18:33:05 +01:00
Jo-Philipp Wich
65e71b94e3 luci-app-firewall: support 'limit' and 'limit_burst' options
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 28f4a9fced)
2020-01-28 18:32:42 +01:00
Jo-Philipp Wich
8b46570283 luci-app-firewall: support 'DSCP' action and matches for rules
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit aa62419e5b)
2020-01-28 18:31:22 +01:00
Jo-Philipp Wich
75dc12f56a luci-app-firewall: support 'MARK' action and matches for rules
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3c0fcf49d4)
2020-01-28 18:31:22 +01:00
Jo-Philipp Wich
819079e268 luci-app-firewall: support 'mark' parameter for redirects
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit cdf240f0a0)
2020-01-28 18:30:40 +01:00
Jo-Philipp Wich
85dbdd03a3 luci-app-firewall: support 'helper' and 'reflection_src' parameters for redirects
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 61fe2146dd)
2020-01-28 18:30:40 +01:00
Jo-Philipp Wich
4a2281814d luci-app-firewall: support 'helper' and 'set_helper' parameters for rules
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d601e79da5)
2020-01-28 18:30:39 +01:00
Jo-Philipp Wich
c722cf3c46 luci-app-firewall: support 'direction' and 'device' parameters for rules
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 267085cf2d)
2020-01-28 18:30:39 +01:00
Jo-Philipp Wich
f8265cefc7 luci-app-firewall: fix family display for port forwards
The underlying fw3 program currently only does IPv4 port forwards while
LuCI incorrectly reports IPv4 + IPv6 for each forward. Adjust the text
accordingly to fix this.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a178cdb5cf)
2020-01-28 18:30:39 +01:00
Jo-Philipp Wich
1787cd4a4c luci-app-firewall: introduce support for "config nat" sections
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit c8b8ae6b8e)
2020-01-28 18:29:51 +01:00
Jo-Philipp Wich
37b0a263bf luci-base: add L.media() URL construction helper
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b60b4790d1)
2020-01-28 11:15:21 +01:00
Hannu Nyman
038050a912
Merge pull request #3578 from Andy2244/luci-app-smbd-rename_luci-app-ksmbd-(19.07)
[19.07] luci-app-smbd: rename to luci-app-ksmbd
2020-01-28 06:55:37 +02:00
Andy Walsh
c73f1ef5d4 luci-app-smbd: rename to luci-app-ksmbd
* follow upstream name change to ksmbd
* remove old artifacs from "applications\luci-app-cifsd\po\"

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
2020-01-27 22:09:08 +01:00
Hannu Nyman
f519510f84 i18n: fix locale codes (nextdns, vpn-policy-routing)
Fix Chinese locale codes for luci-app-nextdns and luci-app-vpn-policy-routing

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2020-01-26 23:04:56 +02:00
Hannu Nyman
2db59e4f23 treewide: i18n - sync translations
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2020-01-26 22:52:53 +02:00
Hannu Nyman
0bef1804ed luci-mod-system: remove abbreviation from LED config menu item
Remove the abbreviation coding from the menu item, as it does nor work
in menu and seems to prevent translation of the menu item.

(This was the only menu item in LuCI that had abbr logic.)

Reference to #3553

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 2a1a9874f5)
2020-01-24 20:54:51 +02:00
Jo-Philipp Wich
b349428e16 luci-lib-ip: explicitly initialize address scope value
Explicitly initialize the address scope value to zero in parse_cidr() and
L_setaddr() to avoid stray scope identifiers getting added when formatting
the address object as string.

Fixes: 1d2b4c777 ("luci-lib-ip: support scoped IPv6 addresses")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 5cbbfaba3e)
2020-01-23 12:37:40 +01:00
Florian Eckert
421791dcad luci-theme-material: fix button position on modal save
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 71743a7ef6)
2020-01-21 09:27:24 +01:00
Jo-Philipp Wich
8e8ead8db3 luci-app-openvpn: allow and restrict file uploads to /etc/openvpn/
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit cc01770fa1)
2020-01-20 19:41:49 +01:00
Jo-Philipp Wich
17501c6e5e luci-compat: upload.htm: expose root_directory and initial_directory
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 878d662282)
2020-01-20 19:41:49 +01:00
Jo-Philipp Wich
2d286c76b7 luci-base: ui.js: UIFileUpload fixes
- Introduce a new option `initial_directory` which describes the initial
   directory to display when nothing is selected, default to the root
   directory

 - Prevent stray legacy cbi reloads when deselecting files

 - Fix within-root-directory-check for initial rendering

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 136b965b25)
2020-01-20 19:41:49 +01:00
Jo-Philipp Wich
3aeda2a2ea luci-mod-status: refactor luci-bwc
- Read interface statistics from /sys/class/net/
 - Discover all wireless interfaces, not just specifically named ones

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 8b1d831935)
2020-01-20 18:58:40 +01:00
Florian Eckert
c395d43807 luci-theme-material: fix apply dropdown color
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 1c49bda198)
2020-01-20 14:15:20 +01:00
MartB
dc79166bd3 luci-theme-*: remove modal max-height #3383 v2
Signed-off-by: MartB <mart.b@outlook.de>
(cherry picked from commit c6122af7ea)
2020-01-19 20:19:02 +01:00
Jo-Philipp Wich
66e1415122 luci-theme-bootstrap: add CSS fixes for tooltip elements
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0d97ea26f8)
2020-01-19 20:17:03 +01:00
Jo-Philipp Wich
2f219f85fc luci-base: form.js: add a new "contains" dependency mode
By tagging option dependencies with `!contains`, dependencies are
considered satisfied when the value is contained in the value of
a related field, instead of being equal to it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 601c4ee01e)
2020-01-19 20:15:52 +01:00
Jo-Philipp Wich
80dcda8a29 luci-base: form.js: don't stringify node arguments in CBIValue.value()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4670099a20)
2020-01-19 20:15:52 +01:00
Jo-Philipp Wich
ae2243cb60 luci-base: ui.js: support clearChoices()/addChoices() for DynLists
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit cc123a03ce)
2020-01-19 20:15:52 +01:00
Jo-Philipp Wich
f1d10ca9ab luci-base: ui.js: use placeholder as select placeholder in DynLists
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9733a182e8)
2020-01-19 20:15:52 +01:00
Jo-Philipp Wich
b3815b00e2 luci-base: ui.js: properly handle rich choices in Dropdowns, DynLists
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4c52718dea)
2020-01-19 20:15:52 +01:00
Jo-Philipp Wich
f400982da4 luci-base: fs.js: properly escape arguments in exec_direct()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e884b63916)
2020-01-19 20:13:39 +01:00
Jo-Philipp Wich
b26f16f241 luci-base: fs.js: add read_direct() and exec_direct() functions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f3724e46a5)
2020-01-19 20:13:06 +01:00
Jo-Philipp Wich
f463570590 luci-base: cbi.js: collapse whitespace before language string hashing
To mirror the behavior of the Lua runtime, we need to collapse whitepace
in translation source strings before doing the string table lookup.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit aca2c4ba4e)
2020-01-19 20:12:02 +01:00
David Lam
e994b09333 luci-base: add system cert bundle detection
Add detection mechanism for system cert CA bundle installed by the
ca-bundle package. Used by LuCI to detect whether the "Use system
certificates" certificate validation option should be enabled.

Signed-off-by: David Lam <david@thedavid.net>
(cherry picked from commit 27b21c2a62)
2020-01-19 20:10:49 +01:00
Dirk Brenken
8f57e814d9
luci-app-travelmate: bugfix add/editing WPA3 uplinks
* see forum post
https://forum.openwrt.org/t/travelmate-support-thread/5155/318

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 9ca877e08e)
2020-01-18 07:42:16 +01:00
Stan Grishin
5baeb64b49 luci-app-vpn-policy-routing: styling bugfix
Signed-off-by: Stan Grishin <stangri@melmac.net>
(cherry picked from commit 87b9fabc89)
2020-01-16 09:54:01 +01:00
Jo-Philipp Wich
a13689c800 luci-proto-modemmanager: drop package
The corresponding modemmanager package is not available in 19.07.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-16 09:07:19 +01:00
Jo-Philipp Wich
48107c0679 luci-theme-bootstrap: fix invalid dropdown state styling
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3c5feae57c)
2020-01-16 09:06:54 +01:00
Jo-Philipp Wich
e01ef08442 luci-base: form.js: fix immediate validation of activated options
When form options are activated because their dependencies are satisified,
ensure that an immediate validation is triggered to highlight potential
errors without having the user to activate another form control first.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 77c2998f32)
2020-01-16 09:06:53 +01:00
Hannu Nyman
335692a738 treewide: i18n - sync translations
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2020-01-10 18:41:34 +02:00