oweals/luci.git
4 years agoluci-app-ksmbd: support new UCI option "allow_legacy_protocols" 3622/head
Andy Walsh [Sat, 15 Feb 2020 16:18:09 +0000 (17:18 +0100)]
luci-app-ksmbd: support new UCI option "allow_legacy_protocols"

* support new UCI option "allow_legacy_protocols"

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
4 years agoluci-app-ksmbd: update for 3.2.1 version (usmbd -> ksmbd.mountd)
Andy Walsh [Sat, 15 Feb 2020 16:16:17 +0000 (17:16 +0100)]
luci-app-ksmbd: update for 3.2.1 version (usmbd -> ksmbd.mountd)

* update for 3.2.1 version (usmbd -> ksmbd.mountd)

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
4 years agoluci-base: cbi.js: avoid double-initialization of dropdowns
Jo-Philipp Wich [Fri, 14 Feb 2020 07:43:28 +0000 (08:43 +0100)]
luci-base: cbi.js: avoid double-initialization of dropdowns

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9ae1f478960f9587e8123e61e1a2221e866da26b)

4 years agoluci-base: luci.js: L.dom.data(): gracefully handle non-node argument
Jo-Philipp Wich [Fri, 14 Feb 2020 07:40:15 +0000 (08:40 +0100)]
luci-base: luci.js: L.dom.data(): gracefully handle non-node argument

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 308215ca156212ad2a632b31179c2284a59a8556)

4 years agotreewide: merge master translation updates
Jo-Philipp Wich [Fri, 14 Feb 2020 07:27:50 +0000 (08:27 +0100)]
treewide: merge master translation updates

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-base: form.js: pass section_id to Button onclick handler
Jo-Philipp Wich [Wed, 12 Feb 2020 21:21:29 +0000 (22:21 +0100)]
luci-base: form.js: pass section_id to Button onclick handler

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c1aeb300f6976086e48dd90aac1504f38b73cdf9)

4 years agoluci-base: form.js: ButtonValue: pass sid as first onclick argument
Jo-Philipp Wich [Wed, 12 Feb 2020 17:31:36 +0000 (18:31 +0100)]
luci-base: form.js: ButtonValue: pass sid as first onclick argument

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 311bcd4b5cb9f630e41f4fc5e08a6993fddc289a)

4 years agorpcd-mod-luci: honour dhcp leases without ip address for host hints
Jo-Philipp Wich [Wed, 12 Feb 2020 21:22:05 +0000 (22:22 +0100)]
rpcd-mod-luci: honour dhcp leases without ip address for host hints

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3702e13f544a0b5478d8e0bacd8b28fe55709a57)

4 years agoluci-base: extend rollback timeout to 90 seconds
Jo-Philipp Wich [Thu, 13 Feb 2020 18:25:56 +0000 (19:25 +0100)]
luci-base: extend rollback timeout to 90 seconds

Ref: #3628
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 81cf99a50706a75a2259296e4aab3f7b3bf5d54e)

4 years agoluci-lib-ip: explicitly clear scope when allocating new userdata
Jo-Philipp Wich [Sat, 8 Feb 2020 10:00:54 +0000 (11:00 +0100)]
luci-lib-ip: explicitly clear scope when allocating new userdata

Fixes: #3609
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c2eeb09bd99b03eead837d8dbfb3f0d8046ccc65)

4 years agoluci-base: validation.js: fix integer and float type validation
Jo-Philipp Wich [Fri, 31 Jan 2020 16:26:39 +0000 (17:26 +0100)]
luci-base: validation.js: fix integer and float type validation

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 187bef9f6ce1263da21f72e91f79192847273ba7)

4 years agoluci-mod-network: dhcp.js: fix resolvefile option depends
Jo-Philipp Wich [Fri, 31 Jan 2020 10:19:09 +0000 (11:19 +0100)]
luci-mod-network: dhcp.js: fix resolvefile option depends

Ref: https://forum.openwrt.org/t/resolvfile-option-not-showing/54229
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 5d15363408d263fccae90b3b7ab0ebac6329eebb)

4 years agoluci-app-advanced-reboot: fix faulty ip.new() invocation
Jo-Philipp Wich [Thu, 30 Jan 2020 07:32:16 +0000 (08:32 +0100)]
luci-app-advanced-reboot: fix faulty ip.new() invocation

Ref: https://github.com/openwrt/luci/issues/3587#issuecomment-580044459
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 6638de5f626a639169ee354bd4d1e99747c8a1c4)

4 years agotreewide: switch to bcp47 language codes
Jo-Philipp Wich [Wed, 29 Jan 2020 12:37:46 +0000 (13:37 +0100)]
treewide: switch to bcp47 language codes

Fixes: #3477
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 48749ca873a5ba385dc372a6a57738024cc2acfb)

4 years agoluci-app-advanced-reboot: properly handle multiple or missing lan IPs
Jo-Philipp Wich [Wed, 29 Jan 2020 08:37:43 +0000 (09:37 +0100)]
luci-app-advanced-reboot: properly handle multiple or missing lan IPs

Fixes: #3587
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0a07d53594b1b9152ea87e4be7366cc91ad36cc1)

4 years agoluci-base: add another magic security attribute to the sysauth cookie
Jo-Philipp Wich [Wed, 29 Jan 2020 08:07:51 +0000 (09:07 +0100)]
luci-base: add another magic security attribute to the sysauth cookie

Fixes: #3585
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 885c97da535c0c77d79e53391de5c37f2704e01a)

4 years agoluci-mod-system: fix zram compression placeholder
Jo-Philipp Wich [Wed, 29 Jan 2020 08:00:57 +0000 (09:00 +0100)]
luci-mod-system: fix zram compression placeholder

Fixes: #3583
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b8f65c340c42acda920298af4318784a79a0965c)

4 years agoluci-base: make swconfig port state parsing more robust
Jo-Philipp Wich [Tue, 28 Jan 2020 17:14:28 +0000 (18:14 +0100)]
luci-base: make swconfig port state parsing more robust

Since swconfig output varies wildly among different switch drivers, rely
on a simpler more robust parsing approach to find the required information.

Ref: https://forum.openwrt.org/t/cannot-read-property-link/50766
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 6d59a6400ed055d71e0b335679d291c22bbdbd40)

4 years agoluci-mod-network: handle missing switch port state information
Jo-Philipp Wich [Tue, 28 Jan 2020 09:08:40 +0000 (10:08 +0100)]
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 616d44c155ae2b4f19e8b2645744a107e38a56c7)

4 years agotreewide: sync and merge master translations
Jo-Philipp Wich [Wed, 29 Jan 2020 07:47:34 +0000 (08:47 +0100)]
treewide: sync and merge master translations

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agobuild: add script to merge master translation into branches
Jo-Philipp Wich [Wed, 29 Jan 2020 07:29:17 +0000 (08:29 +0100)]
build: add script to merge master translation into branches

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit cab574958c580c38ca8dc852d8dada1681d62046)

4 years agobuild: i18n-scan.pl: use xgettext to extract message strings
Jo-Philipp Wich [Tue, 21 Jan 2020 17:39:32 +0000 (18:39 +0100)]
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 901a0821f66b1623ea04d1930a2e6e336138263a)

4 years agobuild: i18n-scan.pl: support extracting translations from menu json
Jo-Philipp Wich [Fri, 6 Dec 2019 13:54:45 +0000 (14:54 +0100)]
build: i18n-scan.pl: support extracting translations from menu json

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9f9358c3e2184c6bac373c93176c474f2658a632)

4 years agoluci-proto-openconnect: explicitely escape slashes in regex literals
Jo-Philipp Wich [Tue, 21 Jan 2020 17:38:46 +0000 (18:38 +0100)]
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 c43fa199bf741589a24c8c7cd23bd0eb7376662e)

4 years agoluci-proto-wireguard: explicitely escape slashes in regex literals
Jo-Philipp Wich [Tue, 21 Jan 2020 17:38:04 +0000 (18:38 +0100)]
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 f1c89c103b6e5109d45a7573f707fb83d8365ce2)

4 years agoluci-app-firewall: fix variable clash leading to incorrect family display
Jo-Philipp Wich [Mon, 20 Jan 2020 17:57:47 +0000 (18:57 +0100)]
luci-app-firewall: fix variable clash leading to incorrect family display

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9fd7e9fc23647fe7adfe84d1bc3b406ab52186e7)

4 years agoluci-app-firewall: add SNAT config migration
Jo-Philipp Wich [Sun, 19 Jan 2020 18:37:28 +0000 (19:37 +0100)]
luci-app-firewall: add SNAT config migration

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit f1771d14aaa5f489d925f4ae775ae54a74ed7b81)

4 years agoluci-app-firewall: rework rule descriptions, deduplicate code
Jo-Philipp Wich [Sun, 19 Jan 2020 15:08:47 +0000 (16:08 +0100)]
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 7944b0a90bbb0f0f5d1da5eaf5d9906ac546c44b)

4 years agoluci-app-firewall: consolidate duplicate option code
Jo-Philipp Wich [Thu, 16 Jan 2020 21:13:34 +0000 (22:13 +0100)]
luci-app-firewall: consolidate duplicate option code

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 0608ff09f8a3b4e558c44ec73b1ef62e19666bac)

4 years agoluci-app-firewall: support 'limit' and 'limit_burst' options
Jo-Philipp Wich [Thu, 16 Jan 2020 20:36:39 +0000 (21:36 +0100)]
luci-app-firewall: support 'limit' and 'limit_burst' options

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 28f4a9fcedda504adac3426195749c45b8893836)

4 years agoluci-app-firewall: support 'DSCP' action and matches for rules
Jo-Philipp Wich [Thu, 16 Jan 2020 20:00:46 +0000 (21:00 +0100)]
luci-app-firewall: support 'DSCP' action and matches for rules

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit aa62419e5ba92a0cdd8ceb487e9b9b819cf357d0)

4 years agoluci-app-firewall: support 'MARK' action and matches for rules
Jo-Philipp Wich [Thu, 16 Jan 2020 19:34:34 +0000 (20:34 +0100)]
luci-app-firewall: support 'MARK' action and matches for rules

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3c0fcf49d4f1a5ee95a82eba50f43e0c2ad67aa7)

4 years agoluci-app-firewall: support 'mark' parameter for redirects
Jo-Philipp Wich [Thu, 16 Jan 2020 17:16:55 +0000 (18:16 +0100)]
luci-app-firewall: support 'mark' parameter for redirects

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit cdf240f0a08aa72767adb162230a048f3445fa6c)

4 years agoluci-app-firewall: support 'helper' and 'reflection_src' parameters for redirects
Jo-Philipp Wich [Thu, 16 Jan 2020 15:30:58 +0000 (16:30 +0100)]
luci-app-firewall: support 'helper' and 'reflection_src' parameters for redirects

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 61fe2146dda3af5473a3695afa7d37d110cc2534)

4 years agoluci-app-firewall: support 'helper' and 'set_helper' parameters for rules
Jo-Philipp Wich [Thu, 16 Jan 2020 15:12:38 +0000 (16:12 +0100)]
luci-app-firewall: support 'helper' and 'set_helper' parameters for rules

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d601e79da593528599829290859769d72412f426)

4 years agoluci-app-firewall: support 'direction' and 'device' parameters for rules
Jo-Philipp Wich [Thu, 16 Jan 2020 14:29:54 +0000 (15:29 +0100)]
luci-app-firewall: support 'direction' and 'device' parameters for rules

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 267085cf2d498c34b92a6e8edae627b1705f88a2)

4 years agoluci-app-firewall: fix family display for port forwards
Jo-Philipp Wich [Thu, 16 Jan 2020 12:54:22 +0000 (13:54 +0100)]
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 a178cdb5cf67a3da8f37e5a8fd5d59fef301fb83)

4 years agoluci-app-firewall: introduce support for "config nat" sections
Jo-Philipp Wich [Wed, 15 Jan 2020 18:22:06 +0000 (19:22 +0100)]
luci-app-firewall: introduce support for "config nat" sections

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit c8b8ae6b8e0b7e249cf0392263f44e519025b426)

4 years agoluci-base: add L.media() URL construction helper
Jo-Philipp Wich [Tue, 28 Jan 2020 10:14:15 +0000 (11:14 +0100)]
luci-base: add L.media() URL construction helper

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b60b4790d1b1b8d52657c0c9ba91da86d0b8a28d)

4 years agoMerge pull request #3578 from Andy2244/luci-app-smbd-rename_luci-app-ksmbd-(19.07)
Hannu Nyman [Tue, 28 Jan 2020 04:55:37 +0000 (06:55 +0200)]
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

4 years agoluci-app-smbd: rename to luci-app-ksmbd 3578/head
Andy Walsh [Mon, 27 Jan 2020 21:09:08 +0000 (22:09 +0100)]
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>
4 years agoi18n: fix locale codes (nextdns, vpn-policy-routing)
Hannu Nyman [Sun, 26 Jan 2020 21:04:56 +0000 (23:04 +0200)]
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>
4 years agotreewide: i18n - sync translations
Hannu Nyman [Sun, 26 Jan 2020 20:52:53 +0000 (22:52 +0200)]
treewide: i18n - sync translations

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
4 years agoluci-mod-system: remove abbreviation from LED config menu item
Hannu Nyman [Thu, 23 Jan 2020 19:11:41 +0000 (21:11 +0200)]
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 2a1a9874f5747f7dcb3b117da87dccce6ca2ff49)

4 years agoluci-lib-ip: explicitly initialize address scope value
Jo-Philipp Wich [Thu, 23 Jan 2020 11:31:36 +0000 (12:31 +0100)]
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 5cbbfaba3e2935b61b42fe339e78b3ff300c1619)

4 years agoluci-theme-material: fix button position on modal save
Florian Eckert [Tue, 21 Jan 2020 08:21:39 +0000 (09:21 +0100)]
luci-theme-material: fix button position on modal save

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 71743a7ef69e9ffdf890bf895d704ecc0648548b)

4 years agoluci-app-openvpn: allow and restrict file uploads to /etc/openvpn/ 3544/head
Jo-Philipp Wich [Mon, 20 Jan 2020 18:16:59 +0000 (19:16 +0100)]
luci-app-openvpn: allow and restrict file uploads to /etc/openvpn/

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit cc01770fa1cf09b729dd931df77b149d1b20d2ef)

4 years agoluci-compat: upload.htm: expose root_directory and initial_directory
Jo-Philipp Wich [Mon, 20 Jan 2020 18:13:57 +0000 (19:13 +0100)]
luci-compat: upload.htm: expose root_directory and initial_directory

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 878d6622828676dbb8bf0cb26ffc242079aae306)

4 years agoluci-base: ui.js: UIFileUpload fixes
Jo-Philipp Wich [Mon, 20 Jan 2020 18:38:17 +0000 (19:38 +0100)]
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 136b965b255c3d37a21e8cf2fc835f83c2f0d3be)

4 years agoluci-mod-status: refactor luci-bwc
Jo-Philipp Wich [Mon, 20 Jan 2020 17:55:05 +0000 (18:55 +0100)]
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 8b1d831935d64758b798958f69dc976ffa6dd8eb)

4 years agoluci-theme-material: fix apply dropdown color
Florian Eckert [Mon, 20 Jan 2020 13:11:16 +0000 (14:11 +0100)]
luci-theme-material: fix apply dropdown color

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 1c49bda198ef33c0423777a966e6c6ab477da34b)

4 years agoluci-theme-*: remove modal max-height #3383 v2
MartB [Tue, 10 Dec 2019 16:25:41 +0000 (17:25 +0100)]
luci-theme-*: remove modal max-height #3383 v2

Signed-off-by: MartB <mart.b@outlook.de>
(cherry picked from commit c6122af7ea9918439abc20c32603197045259b27)

4 years agoluci-theme-bootstrap: add CSS fixes for tooltip elements
Jo-Philipp Wich [Sun, 19 Jan 2020 16:50:37 +0000 (17:50 +0100)]
luci-theme-bootstrap: add CSS fixes for tooltip elements

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0d97ea26f8a1953ec059191cba31cc06b74f6136)

4 years agoluci-base: form.js: add a new "contains" dependency mode
Jo-Philipp Wich [Sun, 19 Jan 2020 15:00:57 +0000 (16:00 +0100)]
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 601c4ee01e21f4da3fc615196d21fde72bfbaee9)

4 years agoluci-base: form.js: don't stringify node arguments in CBIValue.value()
Jo-Philipp Wich [Sun, 19 Jan 2020 14:56:59 +0000 (15:56 +0100)]
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 4670099a20de4700f4c7cb34f67618975b2f3a16)

4 years agoluci-base: ui.js: support clearChoices()/addChoices() for DynLists
Jo-Philipp Wich [Sun, 19 Jan 2020 14:52:58 +0000 (15:52 +0100)]
luci-base: ui.js: support clearChoices()/addChoices() for DynLists

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit cc123a03ce738dffae9abf5aefad9b75020a0a04)

4 years agoluci-base: ui.js: use placeholder as select placeholder in DynLists
Jo-Philipp Wich [Sun, 19 Jan 2020 14:52:13 +0000 (15:52 +0100)]
luci-base: ui.js: use placeholder as select placeholder in DynLists

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9733a182e8dc1713e27e784fa7aded553caad695)

4 years agoluci-base: ui.js: properly handle rich choices in Dropdowns, DynLists
Jo-Philipp Wich [Sun, 19 Jan 2020 14:50:33 +0000 (15:50 +0100)]
luci-base: ui.js: properly handle rich choices in Dropdowns, DynLists

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4c52718deac9d9259bbf2850bea743d9f3b727f3)

4 years agoluci-base: fs.js: properly escape arguments in exec_direct()
Jo-Philipp Wich [Wed, 18 Dec 2019 20:22:06 +0000 (21:22 +0100)]
luci-base: fs.js: properly escape arguments in exec_direct()

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e884b63916ebf6d1a7e4f7c92240a76964ecaa85)

4 years agoluci-base: fs.js: add read_direct() and exec_direct() functions
Jo-Philipp Wich [Wed, 18 Dec 2019 20:10:15 +0000 (21:10 +0100)]
luci-base: fs.js: add read_direct() and exec_direct() functions

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f3724e46a5fc33b3a6fc9f935b88e395c746149f)

4 years agoluci-base: cbi.js: collapse whitespace before language string hashing
Jo-Philipp Wich [Thu, 16 Jan 2020 17:10:04 +0000 (18:10 +0100)]
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 aca2c4ba4e4c847e5ae86e5539537f213678a0f3)

4 years agoluci-base: add system cert bundle detection
David Lam [Thu, 16 Jan 2020 09:15:40 +0000 (01:15 -0800)]
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 27b21c2a6262a8c383c783e98320746f22fe8f6f)

4 years agoluci-app-travelmate: bugfix add/editing WPA3 uplinks
Dirk Brenken [Sat, 18 Jan 2020 05:28:14 +0000 (06:28 +0100)]
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 9ca877e08e6d23f76751fff8c458e1985bebb1f7)

4 years agoluci-app-vpn-policy-routing: styling bugfix
Stan Grishin [Wed, 15 Jan 2020 20:06:34 +0000 (13:06 -0700)]
luci-app-vpn-policy-routing: styling bugfix

Signed-off-by: Stan Grishin <stangri@melmac.net>
(cherry picked from commit 87b9fabc89445564e23aa983b74f0a720ce0312a)

4 years agoluci-proto-modemmanager: drop package
Jo-Philipp Wich [Thu, 16 Jan 2020 08:07:19 +0000 (09:07 +0100)]
luci-proto-modemmanager: drop package

The corresponding modemmanager package is not available in 19.07.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoluci-theme-bootstrap: fix invalid dropdown state styling
Jo-Philipp Wich [Wed, 15 Jan 2020 17:54:32 +0000 (18:54 +0100)]
luci-theme-bootstrap: fix invalid dropdown state styling

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3c5feae57c2dd5866aece2725f3ddea7024390cc)

4 years agoluci-base: form.js: fix immediate validation of activated options
Jo-Philipp Wich [Wed, 15 Jan 2020 17:52:16 +0000 (18:52 +0100)]
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 77c2998f32caccac52a885e84bb6357a9799ebca)

4 years agotreewide: i18n - sync translations
Hannu Nyman [Fri, 10 Jan 2020 16:40:41 +0000 (18:40 +0200)]
treewide: i18n - sync translations

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
4 years agoMerge pull request #3493 from stangri/19.07-luci-app-advanced-reboot
Hannu Nyman [Fri, 10 Jan 2020 15:20:11 +0000 (17:20 +0200)]
Merge pull request #3493 from stangri/19.07-luci-app-advanced-reboot

[19.07] luci-app-advanced-reboot: pluggable device files, highlight current partition

4 years agoluci-app-advanced-reboot: pluggable device files, highlight current partition 3493/head
Stan Grishin [Fri, 10 Jan 2020 14:54:31 +0000 (07:54 -0700)]
luci-app-advanced-reboot: pluggable device files, highlight current partition

Signed-off-by: Stan Grishin <stangri@melmac.net>
4 years agobuild: sort location annotation table in i18n sync process
Hannu Nyman [Tue, 7 Jan 2020 16:58:33 +0000 (18:58 +0200)]
build: sort location annotation table in i18n sync process

The scanning routine has caused unnecessary changes to the .po files
if a string has been found in multiple files and those files have been
found in different order than the previous time.

Sort the location annotations to avoid unnecessary changes to the .po files.
(sort is alphabetic, so the line numbers are also sorted alphabetically)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
[apply a Schwartzian transform to sort locations by path, then line number]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 460bdfe814a34ca5300e7a1a57efecff590dd414)

4 years agoMerge pull request #3468 from urbalazs/translation-backport-19.07-20200105
Jo-Philipp Wich [Mon, 6 Jan 2020 07:25:38 +0000 (08:25 +0100)]
Merge pull request #3468 from urbalazs/translation-backport-19.07-20200105

i18n: backport translations from master branch

4 years agoi18n: backport translations from master branch 3468/head
Balázs Úr [Sun, 5 Jan 2020 23:26:47 +0000 (00:26 +0100)]
i18n: backport translations from master branch

Signed-off-by: Balázs Úr <balazs@urbalazs.hu>
4 years agoMerge pull request #3459 from Andy2244/luci-app-smbd-rename-(19.07)
Hannu Nyman [Sun, 5 Jan 2020 09:44:11 +0000 (11:44 +0200)]
Merge pull request #3459 from Andy2244/luci-app-smbd-rename-(19.07)

[19.07] luci-app-smbd: rename change cifsd->smbd

4 years agoluci-app-firewall: fix zone network default
Jo-Philipp Wich [Sat, 4 Jan 2020 17:46:04 +0000 (18:46 +0100)]
luci-app-firewall: fix zone network default

When a `config zone` section lacks an `option network` or `list network`
setting, its contained interface list defaults to the name of the zone,
e.g. a zone named `foo` will implicitely contain the network `foo` unless
a deviating or empty `option network` is specified.

Adjust the zones.js model accordingly to reflect that implicit default.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d60a1a13b091c622bc2d4d63321d2e3ea0437796)

4 years agoluci-app-smbd: rename change cifsd->smbd 3459/head
Andy Walsh [Sat, 4 Jan 2020 00:13:13 +0000 (01:13 +0100)]
luci-app-smbd: rename change cifsd->smbd

* update for name change cifsd->smbd
* add version code for: kmod, usmbd
* regen translations
* update acl's

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
4 years agoMerge pull request #3456 from stangri/19.07-luci-app-vpn-policy-routing
Hannu Nyman [Fri, 3 Jan 2020 06:51:46 +0000 (08:51 +0200)]
Merge pull request #3456 from stangri/19.07-luci-app-vpn-policy-routing

luci-app-vpn-policy-routing: add note about default routing

4 years agoluci-app-vpn-policy-routing: add note about default routing 3456/head
Stan Grishin [Fri, 3 Jan 2020 04:14:34 +0000 (21:14 -0700)]
luci-app-vpn-policy-routing: add note about default routing

Signed-off-by: Stan Grishin <stangri@melmac.net>
4 years agoMerge pull request #3447 from stangri/19.07-luci-app-vpn-policy-routing
Hannu Nyman [Tue, 31 Dec 2019 15:23:35 +0000 (17:23 +0200)]
Merge pull request #3447 from stangri/19.07-luci-app-vpn-policy-routing

[19.07] luci-app-vpn-policy-routing: initial release

4 years agoluci-app-vpn-policy-routing: initial release 3447/head
Stan Grishin [Mon, 30 Dec 2019 14:51:55 +0000 (07:51 -0700)]
luci-app-vpn-policy-routing: initial release

Signed-off-by: Stan Grishin <stangri@melmac.net>
4 years agoluci-app-firewall: update rule ip hints based on address family
Jo-Philipp Wich [Mon, 30 Dec 2019 13:50:43 +0000 (14:50 +0100)]
luci-app-firewall: update rule ip hints based on address family

Fixes: #3119
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d07cfba160ca7eb433e74f1ffad8d10e2b9cc9ca)

4 years agoluci-base: form.js: implement AbstractValue.getUIElement()
Jo-Philipp Wich [Mon, 30 Dec 2019 13:40:57 +0000 (14:40 +0100)]
luci-base: form.js: implement AbstractValue.getUIElement()

Introduce a new method `getUIElement()` which simplifies obtaining the
underlying per-section UI widget class instance for a from option object.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9e259174323a406b93664e307bb8a50fc3d80483)

4 years agoluci-base: ui.js: implement UIDropdown.{add,clear}Choices()
Jo-Philipp Wich [Mon, 30 Dec 2019 13:04:18 +0000 (14:04 +0100)]
luci-base: ui.js: implement UIDropdown.{add,clear}Choices()

The new `addChoices()` and `clearChoices()` functions allow clearing and
adding new options to existing dropdown instances respectively.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b0836b037e55bfc9201e60a9446f2f7800d7f195)

4 years agoluci-base: ui.js: expose UIElement class as AbstractElement
Jo-Philipp Wich [Mon, 30 Dec 2019 13:03:14 +0000 (14:03 +0100)]
luci-base: ui.js: expose UIElement class as AbstractElement

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0d0a3f4d0df44387fe9bec0c5597f6c491f44eec)

4 years agoMerge pull request #3439 from urbalazs/translation-backport-19.07-20191227
Jo-Philipp Wich [Mon, 30 Dec 2019 09:38:45 +0000 (10:38 +0100)]
Merge pull request #3439 from urbalazs/translation-backport-19.07-20191227

i18n: backport translations from master branch

4 years agoluci-app-firewall: store week- and monthday restrictions as strings
Jo-Philipp Wich [Sun, 29 Dec 2019 23:08:17 +0000 (00:08 +0100)]
luci-app-firewall: store week- and monthday restrictions as strings

Fixes: FS#2661
Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2661
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 18c60968dc9ee280ea8a71bb98653b74a340668a)

4 years agoi18n: backport translations from master branch 3439/head
Balázs Úr [Fri, 27 Dec 2019 16:49:40 +0000 (17:49 +0100)]
i18n: backport translations from master branch

Signed-off-by: Balázs Úr <balazs@urbalazs.hu>
4 years agoluci-theme-bootstrap: fix background of large modal overlays.
MartB [Mon, 2 Dec 2019 21:16:24 +0000 (22:16 +0100)]
luci-theme-bootstrap: fix background of large modal overlays.

Signed-off-by: MartB <mart.b@outlook.de>
(cherry picked from commit 7f9eb4638b0fa5d7b08270b232bb6bbe13b2e570)

4 years agoi18n: sync translations
Hannu Nyman [Fri, 20 Dec 2019 06:49:14 +0000 (08:49 +0200)]
i18n: sync translations

Sync translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
4 years agoMerge pull request #3422 from stangri/19.07-luci-app-https-dns-proxy
Hannu Nyman [Thu, 19 Dec 2019 18:52:57 +0000 (20:52 +0200)]
Merge pull request #3422 from stangri/19.07-luci-app-https-dns-proxy

[19.07] luci-app-https-dns-proxy: package name change, support for RFC8484 binary

4 years agoluci-app-https-dns-proxy: package name change, support for RFC8484 binary 3422/head
Stan Grishin [Thu, 19 Dec 2019 18:20:13 +0000 (11:20 -0700)]
luci-app-https-dns-proxy: package name change, support for RFC8484 binary

Signed-off-by: Stan Grishin <stangri@melmac.net>
4 years agoocserv: fix the public key ID calculation
Nikos Mavrogiannopoulos [Sat, 14 Dec 2019 08:55:11 +0000 (09:55 +0100)]
ocserv: fix the public key ID calculation

New versions of certtool change its output format and thus break
the previous parsing. This update works with certtool 3.5.x or later.
It also restricts the output to valid values for openconnect 7.x or
later for simplification.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
(cherry picked from commit c81ca8dae3e914b41b754e1cdc7cad3aeead9e66)

4 years agoluci-mod-network: dhcp.js: fix default state of nonwildcard
Jo-Philipp Wich [Mon, 16 Dec 2019 17:05:07 +0000 (18:05 +0100)]
luci-mod-network: dhcp.js: fix default state of nonwildcard

Fixes: #3415
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ffe81aead3f806f28220034cb6276d89774fa47b)

4 years agoluci-mod-network: fix rebind list validation
Jo-Philipp Wich [Mon, 16 Dec 2019 17:01:10 +0000 (18:01 +0100)]
luci-mod-network: fix rebind list validation

Fixes: 62e28f4b0 ("luci-mod-network: dhcp.js: fix address and rebind list validation")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3cdd4969466de7efd2cfe0534119acdc6f35218e)

4 years agoluci-mod-network: dhcp.js: fix address and rebind list validation
Jo-Philipp Wich [Mon, 16 Dec 2019 16:49:51 +0000 (17:49 +0100)]
luci-mod-network: dhcp.js: fix address and rebind list validation

Fixes: #3130
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 62e28f4b0a61abc4d45c6dc7cc5794e7847909e5)

4 years agoluci-mod-network: re-add DHCPv6 lease status to dnsmasq page
Jo-Philipp Wich [Mon, 16 Dec 2019 13:38:22 +0000 (14:38 +0100)]
luci-mod-network: re-add DHCPv6 lease status to dnsmasq page

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2674
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f6410361c8fa84d258c505bba5b6ad157d6a30ee)

4 years agoluci-lib-httpclient: accept scoped IPv6 addresses
Jo-Philipp Wich [Mon, 9 Dec 2019 16:36:05 +0000 (17:36 +0100)]
luci-lib-httpclient: accept scoped IPv6 addresses

Ref: https://github.com/openwrt/luci/issues/3380
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d87169c0f60f9e7c1f8a61b2809473802093ff31)

4 years agoluci-lib-ip: support scoped IPv6 addresses
Jo-Philipp Wich [Mon, 9 Dec 2019 16:31:51 +0000 (17:31 +0100)]
luci-lib-ip: support scoped IPv6 addresses

Ref: https://github.com/openwrt/luci/issues/3380
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f7a7f89e0ce324115098f4496e3e72d8bb63613a)

4 years agoluci-base: ui.js: ensure that select choice labels are properly escaped
Jo-Philipp Wich [Wed, 4 Dec 2019 17:04:20 +0000 (18:04 +0100)]
luci-base: ui.js: ensure that select choice labels are properly escaped

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 71d370a964f3ec4970bcded9198ff559316902ff)

4 years agoluci-base: ui.js: properly escape dynlist items for rendering
Jo-Philipp Wich [Wed, 4 Dec 2019 15:08:40 +0000 (16:08 +0100)]
luci-base: ui.js: properly escape dynlist items for rendering

Ref: https://forum.openwrt.org/t/luci-theme-openwrt-reports-error/49736
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ee360669474ddc7d94dd2853b2411da929fb5593)