project/luci.git
3 years agoluci-mod-network: fix legacy bridge configuration
Jo-Philipp Wich [Sat, 20 Mar 2021 23:18:20 +0000 (00:18 +0100)]
luci-mod-network: fix legacy bridge configuration

Ref: https://github.com/openwrt/luci/pull/4307#issuecomment-803432603
Fixes: faad7464a8 ("luci-mod-network: add support for network.device sections")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit edf640af583de122b020d215aadd141028c9458f)

3 years agoluci-mod-network: fix invalid variable access when creating interfaces
Jo-Philipp Wich [Sat, 20 Mar 2021 23:17:35 +0000 (00:17 +0100)]
luci-mod-network: fix invalid variable access when creating interfaces

Fixes: eeef38d534 ("luci-mod-network: add support for bridge vlan filtering")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1c4284150dff9d37503f6f901d047c0caa9a3af0)

3 years agoluci-mod-network: fix opacity for device icon tooltips
Jo-Philipp Wich [Thu, 18 Mar 2021 16:24:09 +0000 (17:24 +0100)]
luci-mod-network: fix opacity for device icon tooltips

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

3 years agoluci-mod-network: tools.network: handle bridge config and vlan corner cases
Jo-Philipp Wich [Thu, 18 Mar 2021 16:19:42 +0000 (17:19 +0100)]
luci-mod-network: tools.network: handle bridge config and vlan corner cases

 - Disable interface-level bridging if a corresponding br-$name bridge
   already exists as device declaration

 - Exempt wireless interfaces from bridge port configuration, they can only
   be attached indirectly through "option network"

 - Consider bridge ports from both "option ifname" in interface/device
   sections and from "option ports" in bridge-vlan ones

 - Small fixes for rendering quirks

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

3 years agoluci-mod-network: allow wifi bridging with bridge or bridge vlan ifaces
Jo-Philipp Wich [Wed, 17 Mar 2021 09:45:04 +0000 (10:45 +0100)]
luci-mod-network: allow wifi bridging with bridge or bridge vlan ifaces

Recent netifd automatically adds wireless devices as bridge ports if the
layer 2 device referenced by the "config interface" target network is a
Linux network bridge or a VLAN interface on top of a network bridge.

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

3 years agoluci-base: network.js: recognize DSA ports and bridge VLANs
Jo-Philipp Wich [Thu, 18 Mar 2021 16:09:07 +0000 (17:09 +0100)]
luci-base: network.js: recognize DSA ports and bridge VLANs

Use the newly introduced devtype attribute for more robust network device
type detection. This also allows us to easily recognize DSA ports.

Furthermore, synthesize VLAN devices declared by uci bridge-vlan sections,
similar to how it is done for legacy swconfig switch_vlan ones.

Finally implement a new Network.Device.getParent() method to use the newly
available "parent" attribute to resolve the base device of DSA ports or
VLAN devices.

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

3 years agoluci-mod-network: add support for bridge vlan filtering
Jo-Philipp Wich [Tue, 28 Jul 2020 18:51:10 +0000 (20:51 +0200)]
luci-mod-network: add support for bridge vlan filtering

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

3 years agoluci-mod-network: add support for network.device sections
Jo-Philipp Wich [Mon, 27 Jul 2020 15:12:54 +0000 (17:12 +0200)]
luci-mod-network: add support for network.device sections

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

3 years agoluci-mod-network: interfaces.js: simplify some code using new ui helpers
Jo-Philipp Wich [Thu, 6 Aug 2020 15:37:34 +0000 (17:37 +0200)]
luci-mod-network: interfaces.js: simplify some code using new ui helpers

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

3 years agoluci-mod-network: issue with breakdown of dnsmasq after duplication of static IP...
Oleksandr Pastushkov [Sun, 3 Jan 2021 22:58:56 +0000 (00:58 +0200)]
luci-mod-network: issue with breakdown of dnsmasq after duplication of static IP was fixed

Before this commit, assigning the same static IP address to two
different hosts disabled dnsmasq.

Logic of adding a new static lease was modified. If user try to assign a
new MAC address to already reserved IP, old lease will be modified (list
of MAC addresses will be extended by new MAC) instead of creation a new lease with the same IP.

Signed-off-by: Oleksandr Pastushkov <oleks.pastushkov@gmail.com>
(cherry picked from commit 463e910119813aaea0755ff5c16c91ce412a8cbb)

3 years agoluci-mod-network: drop duplicated "Master" option
Rafał Miłecki [Thu, 27 May 2021 06:39:35 +0000 (08:39 +0200)]
luci-mod-network: drop duplicated "Master" option

It got accidentally added while cherry picking RA and NDP params
support.

Fixes: 3a9ebc537f63 ("luci-mod-network: Introduce new RA and NDP params with help-text.")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agotreewide: backport i18n translations from master
Hannu Nyman [Wed, 26 May 2021 16:10:51 +0000 (19:10 +0300)]
treewide: backport i18n translations from master

Backport translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoluci-theme-material: fix wrong active state on common prefix node
Liangbin Lian [Wed, 21 Apr 2021 10:00:48 +0000 (18:00 +0800)]
luci-theme-material: fix wrong active state on common prefix node

Before fixed, if we have two nodes: 'services/ddns' and 'services/ddnsto',
click any one of they, will show they all actived.

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
(cherry picked from commit 97d50d2c6b80805cd7e513eeafc8b62fef4ab1b6)

3 years agoluci-app-samba4: support listen on multiple interfaces
Liangbin Lian [Tue, 25 May 2021 02:34:05 +0000 (10:34 +0800)]
luci-app-samba4: support listen on multiple interfaces

/etc/init.d/samba4 already support that

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
(cherry picked from commit 169ab9979eee780758256c2859f7c2ee86a0b0ae)

3 years agotreewide: i18n - Backport translations
Hannu Nyman [Sun, 16 May 2021 17:52:12 +0000 (20:52 +0300)]
treewide: i18n - Backport translations

Backport translations from master and sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoluci-mod-status: fix potential XSS via specially crafted DNS names
Jo-Philipp Wich [Wed, 12 May 2021 09:49:31 +0000 (11:49 +0200)]
luci-mod-status: fix potential XSS via specially crafted DNS names

When an upstream NS returns PTR domain names containing HTML, it is
added verbatim to the connection status table.

Prevent this issue by HTML escaping any values in the source and
destination columns.

Fixes: CVE-2021-32019
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3c66c5b1651aa25afbff09bee45047da9a0ba43d)

3 years agotreewide: backport translations i18n
Hannu Nyman [Sat, 8 May 2021 14:05:54 +0000 (17:05 +0300)]
treewide: backport translations i18n

Backport translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoluci-mod-status: iptables: always make tab pane visible
Jo-Philipp Wich [Fri, 7 May 2021 17:04:38 +0000 (19:04 +0200)]
luci-mod-status: iptables: always make tab pane visible

When ip6tables is not present, the tab group was not initialized,
causing the iptables status display to be empty with certain themes.

Manually mark the pane active in this case to avoid the problem.

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

3 years agoluci-app-attendedsysupgrade: fix branch detection
Paul Spooren [Wed, 5 May 2021 16:09:08 +0000 (18:09 +0200)]
luci-app-attendedsysupgrade: fix branch detection

The running branch determines which upgrades are suggested. A jump to a
newer branch (e.g. 19.07.8 to 21.02.1) is only suggested if the advanced
mode is enable, since it may break the router.

OpenWrt versions end in either `-SNAPSHOT`, `.X-rcY` or `.x`. All these
suffixes are removed, resulting in the branch name.

Previously the `-SNAPSHOT` suffix wasn't removed resulting in wrong
branch names.

Also clean up some log spam.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 85e9ee31239c4e912613005f4c222f13c34e9a36)

3 years agoluci-app-attendedsysupgrade: hide branch update
Paul Spooren [Thu, 29 Apr 2021 20:53:09 +0000 (22:53 +0200)]
luci-app-attendedsysupgrade: hide branch update

Branch updates (e.g. 19.07 to 21.02) are risky and shouldn't be
suggested by default. Hide those unless the advanced mode is enabled.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 9184721fab65934fe016c132a8f11a2308742f92)

3 years agoluci-app-mwan3: i18n sync translations
Florian Eckert [Thu, 6 May 2021 10:27:00 +0000 (12:27 +0200)]
luci-app-mwan3: i18n sync translations

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agoluci-app-mwan3: fix css status with
Florian Eckert [Thu, 6 May 2021 09:44:57 +0000 (11:44 +0200)]
luci-app-mwan3: fix css status with

This commit fixes the width of the mwan3 status page for the
openwrt-2020 theme.

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

3 years agoluci-app-mwan3: add i18n to status page
Florian Eckert [Thu, 6 May 2021 09:22:02 +0000 (11:22 +0200)]
luci-app-mwan3: add i18n to status page

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

3 years agoluci-app-mwan3: update status page for no tracked interfaces
Florian Eckert [Mon, 3 May 2021 08:55:38 +0000 (10:55 +0200)]
luci-app-mwan3: update status page for no tracked interfaces

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

3 years agoluci-base: i18n sync translations
Florian Eckert [Tue, 4 May 2021 07:17:11 +0000 (09:17 +0200)]
luci-base: i18n sync translations

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agoluci-base: change button-text from Dismiss to Close in UCI changes overview
Sven Roederer [Fri, 30 Apr 2021 23:12:02 +0000 (01:12 +0200)]
luci-base: change button-text from Dismiss to Close in UCI changes overview

Change the left button of the UCI Apply-changes overview to the more correct
function close. This also avoids confusion between Dismiss and Revert, which
translate to the same in german.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
(cherry picked from commit b56912d9fcf6acb0ba3008de3df15188318376f2)

3 years agotreewide: i18n sync translations
Florian Eckert [Tue, 4 May 2021 07:16:04 +0000 (09:16 +0200)]
treewide: i18n sync translations

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agoluci-app-banip: switch IP query provider
Dirk Brenken [Sun, 2 May 2021 20:11:25 +0000 (22:11 +0200)]
luci-app-banip: switch IP query provider

* switch to IPWHOIS.IO for IP report queries, the IP geolocation API is
  more accurate & faster

Signed-off-by: Dirk Brenken <dev@brenken.org>
3 years agoluci-app-travelmate: typo fix
Dirk Brenken [Sat, 1 May 2021 09:11:32 +0000 (11:11 +0200)]
luci-app-travelmate: typo fix

* typo fix & sync translations

Signed-off-by: Dirk Brenken <dev@brenken.org>
3 years agoluci-app-attendedsysupgrade: add target in reuqest
Paul Spooren [Sat, 24 Apr 2021 13:45:36 +0000 (03:45 -1000)]
luci-app-attendedsysupgrade: add target in reuqest

The updated ASU api requires `target` within reuqests since the
`profile` or `board_name` is never truely unique. This is especially a
problem for x86 devices which mostly use `generic` as profile name.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit c6b4d4ab5a2c57889bcf14fafac17e73d22205c6)

3 years agotreewide: i18n - backport translations from master
Hannu Nyman [Tue, 27 Apr 2021 20:31:27 +0000 (23:31 +0300)]
treewide: i18n - backport translations from master

Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoluci-app-statistics: treat APC UPS "host" setting as single value option
Jo-Philipp Wich [Tue, 27 Apr 2021 08:09:05 +0000 (10:09 +0200)]
luci-app-statistics: treat APC UPS "host" setting as single value option

Existing Lua code incorrectly stated that the "Host" option takes a space
sparated list of hostnames which is not the case since the collect plugin
does not handle multiple hosts.

This change reverts the configuration to a simple value as proposed by
the original PR and adjusts the config summary accordingly, while retaining
the translation string.

Ref: https://github.com/openwrt/luci/pull/5010#issuecomment-827285319
Fixes: dd5d96afd ("luci-app-statistics: fix APC UPS host configuration")
Fixes: e7d22dce5 ("luci-app-statistics: convert collectd configuration to client side views")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 8816c8fff7e8e30f19e85c0f1c7f70b6914be701)

3 years agoluci-app-statistics: fix APC UPS host configuration
Jo-Philipp Wich [Mon, 26 Apr 2021 15:38:48 +0000 (17:38 +0200)]
luci-app-statistics: fix APC UPS host configuration

Ensure that list of hosts is stored as space separated list, like it was
done in the previous Lua implementation.

Fixes: #5010
Fixes: e7d22dce5 ("luci-app-statistics: convert collectd configuration to client side views")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit dd5d96afdba698e11d12880f4adf28e24a140305)

3 years agoluci-app-banip: sync with banIP 0.7.7
Dirk Brenken [Thu, 22 Apr 2021 04:04:22 +0000 (06:04 +0200)]
luci-app-banip: sync with banIP 0.7.7

* support the new 'Whitelist Only' mode
* sync translations

Signed-off-by: Dirk Brenken <dev@brenken.org>
3 years agoluci-app-dockerman: Carelessness fixed during branch rebasing
Florian Eckert [Wed, 21 Apr 2021 20:56:50 +0000 (22:56 +0200)]
luci-app-dockerman: Carelessness fixed during branch rebasing

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

3 years agoluci-mod-network: fix handling of optional RA/NDP options
Hannu Nyman [Tue, 20 Apr 2021 18:06:42 +0000 (21:06 +0300)]
luci-mod-network: fix handling of optional RA/NDP options

Fix the handling of optional IPv6 RA and NDP options
that were exposed to LuCI with 504bdb23f

Commit 504bdb23f defined them optional but provided default values.
Those values might get unnecessarily written to /etc/config dhcp when
the the user modifies some other values. Remove the default values,
but provide placeholder for some of them.

Add the missing optional definition to 'ndproxy_routing'.
(It is a flag, so optional default values do not get written to
the config file.)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit b7dd10da0fcdc9c69857d848ce1d47243998a22c)

3 years agoluci-app-dockerman: update I18n
Florian Eckert [Mon, 19 Apr 2021 14:27:34 +0000 (16:27 +0200)]
luci-app-dockerman: update I18n

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agoluci-app-dockerman: revised the information for the individual page
Florian Eckert [Thu, 8 Apr 2021 15:13:59 +0000 (17:13 +0200)]
luci-app-dockerman: revised the information for the individual page

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

3 years agoluci-app-dockerman: move docker uci configuration to own page
Florian Eckert [Thu, 8 Apr 2021 14:11:07 +0000 (16:11 +0200)]
luci-app-dockerman: move docker uci configuration to own page

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

3 years agoluci-app-dockerman: if remote_endpoint is selected a port must be set
Florian Eckert [Thu, 8 Apr 2021 13:55:26 +0000 (15:55 +0200)]
luci-app-dockerman: if remote_endpoint is selected a port must be set

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

3 years agoluci-app-dockerman: if remote_endpoint is selected a host must be set
Florian Eckert [Thu, 8 Apr 2021 13:54:17 +0000 (15:54 +0200)]
luci-app-dockerman: if remote_endpoint is selected a host must be set

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

3 years agoluci-app-dockerman: add datatype and detail info for remote_host option
Florian Eckert [Thu, 8 Apr 2021 13:21:17 +0000 (15:21 +0200)]
luci-app-dockerman: add datatype and detail info for remote_host option

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

3 years agoluci-app-dockerman: add log_level i18n translation
Florian Eckert [Thu, 8 Apr 2021 13:06:51 +0000 (15:06 +0200)]
luci-app-dockerman: add log_level i18n translation

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

3 years agoluci-app-dockerman: do not set log_level for dockerd default setting
Florian Eckert [Thu, 8 Apr 2021 13:03:46 +0000 (15:03 +0200)]
luci-app-dockerman: do not set log_level for dockerd default setting

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

3 years agoluci-app-dockerman: do not preset value selection
Florian Eckert [Thu, 8 Apr 2021 12:59:02 +0000 (14:59 +0200)]
luci-app-dockerman: do not preset value selection

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

3 years agoluci-app-dockerman: set examle registry url as placeholder
Florian Eckert [Thu, 8 Apr 2021 12:54:51 +0000 (14:54 +0200)]
luci-app-dockerman: set examle registry url as placeholder

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

3 years agoluci-app-dockerman: remove setting default bip option
Florian Eckert [Thu, 8 Apr 2021 12:43:22 +0000 (14:43 +0200)]
luci-app-dockerman: remove setting default bip option

If no bip option is set, then the default configuration of dockerd should
be used. The option does not need to be set explicitly.

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

3 years agoluci-app-dockerman: removal of the option socket_path
Florian Eckert [Thu, 8 Apr 2021 12:39:22 +0000 (14:39 +0200)]
luci-app-dockerman: removal of the option socket_path

This option is for debug purposes only. It makes no sense to offer this
option to the user. Especially as it is not used for a remote
connection.

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

3 years agoluci-app-adblock: sync with adblock 4.1.1
Dirk Brenken [Sun, 18 Apr 2021 19:07:37 +0000 (21:07 +0200)]
luci-app-adblock: sync with adblock 4.1.1

* support new RPZ-Trigger 'RPZ-CLIENT-IP' (currently bind only)
* Reporting tweaks/mailing
* cosmetics
* sync translations

Signed-off-by: Dirk Brenken <dev@brenken.org>
3 years agotreewide: Backport translations - i18n
Hannu Nyman [Sat, 17 Apr 2021 16:21:32 +0000 (19:21 +0300)]
treewide: Backport translations - i18n

Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoluci-mod-network: fix xhtml markup
Dirk Brenken [Sat, 17 Apr 2021 16:15:57 +0000 (19:15 +0300)]
luci-mod-network: fix xhtml markup

* fix markup in interfaces.js (#4980)

Signed-off-by: Dirk Brenken <dev@brenken.org>
(Adapted from commit 2617fcdc631d0b504abdb27bb17d44f26c230cda
 by taking only the .js part.)
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoluci-mod-network: Introduce new RA and NDP params with help-text.
Paul Dee [Thu, 1 Apr 2021 17:02:36 +0000 (19:02 +0200)]
luci-mod-network: Introduce new RA and NDP params with help-text.

New: Router Advertisement parameters and accompanying help-text.
New: 3 additional NDP options and accompanying help-text.

Until now, some of the IPv6 settings are mysterious. They are now
clarified. The information is accessible to IPv6 beginners.

Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com>
(cherry picked from commit 504bdb23fbaff28cc31cc1dd2408a9f1cd5eddde)

3 years agoluci-mod-network: Add help text for many existing odhcpd IPv6 parameters
Paul Dee [Thu, 1 Apr 2021 19:52:55 +0000 (21:52 +0200)]
luci-mod-network: Add help text for many existing odhcpd IPv6 parameters
and Global network options ULA.

Relocated the "DHCPv6 Mode" to below RA-Service: DHCPv6-Mode is actually
ra_management in disguise. Better grouping.

Until now, some of the IPv6 settings are mysterious. They are now
clarified. The information is accessible to IPv6 beginners.

Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com>
(cherry picked from commit 988c98bdc6b30a1d9fb17e1ba4444d0beb236b8a)

3 years agoluci-base: form.js: fix AbstractValue.textvalue() for uci list options
Jo-Philipp Wich [Fri, 16 Apr 2021 15:29:32 +0000 (17:29 +0200)]
luci-base: form.js: fix AbstractValue.textvalue() for uci list options

Serialize the uci list value into a space separated string before passing
it to String.format() for HTML escaping. Without that change, empty strings
were returned whenever the underlying uci get operation yieled an array.

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

3 years agoluci-app-fwknopd: add support for ENABLE_CMD_EXEC
Ptilopsis Leucotis [Tue, 13 Apr 2021 12:43:51 +0000 (15:43 +0300)]
luci-app-fwknopd: add support for ENABLE_CMD_EXEC

Add support for execution commands on the fwknopd server.

Signed-off-by: Ptilopsis Leucotis <PtilopsisLeucotis@yandex.com>
(cherry picked from commit 57839f183b9e019c792c7e185174e4be73890c7b)

3 years agoluci-app-xlc: don't build package for arc
Eneas U de Queiroz [Sat, 23 May 2020 14:26:50 +0000 (11:26 -0300)]
luci-app-xlc: don't build package for arc

lxc does not build on arc.  Since luci-app-xlc selects lxc, it needs to
check @!arc first.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit c6d196cc82d75fe47fd48bb107b9cf9f3df6d6a6)

3 years agoluci-app-transmission: fix '&nbsp' exception in OpenWrt theme
Alexander Egorenkov [Sun, 4 Apr 2021 10:41:03 +0000 (12:41 +0200)]
luci-app-transmission: fix '&nbsp' exception in OpenWrt theme

Convert '&nbsp;' to '&#160;' which is both syntactically correct (semicolon present) and XHTML compliant.

Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
(cherry picked from commit afd096edfcd5669510702b47c964ba75d698d5af)

3 years agoMerge pull request #4975 from stangri/21.02-luci-app-simple-adblock
Stan Grishin [Sun, 11 Apr 2021 16:38:48 +0000 (09:38 -0700)]
Merge pull request #4975 from stangri/21.02-luci-app-simple-adblock

[21.02] luci-app-simple-adblock: bugfix: crash when dnsmasq.ipset selected

3 years agoluci-app-simple-adblock: bugfix: crash when dnsmasq.ipset selected 4975/head
Stan Grishin [Sat, 10 Apr 2021 18:45:01 +0000 (18:45 +0000)]
luci-app-simple-adblock: bugfix: crash when dnsmasq.ipset selected

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-app-commands: prevent page reload on invoking command actions
Jo-Philipp Wich [Fri, 9 Apr 2021 12:36:19 +0000 (14:36 +0200)]
luci-app-commands: prevent page reload on invoking command actions

Fixes: f117b7f ("luci-app-commands: use <button> elements")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 36959dc0d10bd012f35c51bf8a6b88ce6c5853a2)

3 years agoluci-app-commands: use <button> elements
Jo-Philipp Wich [Fri, 9 Apr 2021 12:27:00 +0000 (14:27 +0200)]
luci-app-commands: use <button> elements

Use <button> instead of <input type=button> elements to fix compatibility
with OpenWrt 2020 theme.

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

3 years agoluci-theme-openwrt-2020: honor CSS definitions passed by views
Jo-Philipp Wich [Fri, 9 Apr 2021 12:25:51 +0000 (14:25 +0200)]
luci-theme-openwrt-2020: honor CSS definitions passed by views

Legacy Lua views might declare a global `css` variable to inject custom
styles into the template header. Support this mechanism in the OpenWrt 2020
theme as well.

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

3 years agoluci-compat: update markup for CBI TableSections
Jo-Philipp Wich [Fri, 9 Apr 2021 12:24:46 +0000 (14:24 +0200)]
luci-compat: update markup for CBI TableSections

Update legacy CBI markup to use actual table, tr, th and td elements
instead of using div element corresponding table classes.

Fixes compatibility with OpenWrt 2020 theme.

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

3 years agotreewide: i18n - backport translations from master
Hannu Nyman [Fri, 9 Apr 2021 08:40:47 +0000 (11:40 +0300)]
treewide: i18n - backport translations from master

Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoluci-mod-system: implement system.description, system.notes
Henrique de Moraes Holschuh [Mon, 1 Mar 2021 16:18:00 +0000 (13:18 -0300)]
luci-mod-system: implement system.description, system.notes

Implement two new text "options" for UCI system config, intended to
help humans describe the device.

"system.description" is a short, single-line description suitable for
selector UIs in remote administration applications, or remote UCI (over
ubus RPC), etc.  It would also be suitable as a default for LLDP/SNMP
"system description".

"system.notes" is a multi-line, free-form text field that can be used in
any way the user wishes, e.g. to hold installation notes, or unit serial
number and inventory number, location, etc.

Signed-off-by: Henrique de Moraes Holschuh <henrique@nic.br>
3 years agoluci-app-dawn: fix custom markup
Jo-Philipp Wich [Mon, 29 Mar 2021 09:45:01 +0000 (11:45 +0200)]
luci-app-dawn: fix custom markup

 - Properly indent HTML markup
 - Replace div-based table markup with actual tables
 - Escape SSID, hostname and interface values to prevent potential XSS

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

3 years agoluci-base: ui.js: fix UICheckbox widget operation when tooltips are set
Jo-Philipp Wich [Mon, 29 Mar 2021 09:24:59 +0000 (11:24 +0200)]
luci-base: ui.js: fix UICheckbox widget operation when tooltips are set

When a tooltip is rendered for a checkbox widget, an additional node is
placed after the checkbox label element, breaking DOM selectors in
bind(), isChecked(), setValue().

Apparently the functionality was never actually tested.

Fixes: #4938
Fixes: e951236e3 ("luci-base: add tooltip handling")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 95b5c6cd6464d11d6baa22bcf2c9469847353813)

3 years agoluci-app-statistics: remove rrd path triple escape
Philip L. McMahon [Sat, 27 Mar 2021 09:06:42 +0000 (11:06 +0200)]
luci-app-statistics: remove rrd path triple escape

Fixes rendering errors when RRD file names contain IPv6 addresses and the
colon (":") characters are triple escaped.

Adapts the Lua-specific fix in #4340 to Javascript.

Signed-off-by: Philip L. McMahon <philip.l.mcmahon@gmail.com>
(cherry picked from commit d44302b3ac7a5f687c4a2bb6707cc3d922651f82 of PR #4358)

3 years agotreewide: Backport translations and sync
Hannu Nyman [Sat, 27 Mar 2021 09:00:11 +0000 (11:00 +0200)]
treewide: Backport translations and sync

Backport translations from master

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoMerge pull request #4943 from stangri/21.02-luci-app-vpnbypass
Stan Grishin [Thu, 25 Mar 2021 05:27:28 +0000 (22:27 -0700)]
Merge pull request #4943 from stangri/21.02-luci-app-vpnbypass

[21.02] luci-app-vpnbypass: client-side rendering

3 years agoluci-app-vpnbypass: client-side rendering 4943/head
Stan Grishin [Thu, 25 Mar 2021 05:26:22 +0000 (05:26 +0000)]
luci-app-vpnbypass: client-side rendering

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-app-watchcat: sync i18n because of javascript porting
Florian Eckert [Mon, 22 Mar 2021 07:56:05 +0000 (08:56 +0100)]
luci-app-watchcat: sync i18n because of javascript porting

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agoluci-app-eoip: fix i18n for en
Florian Eckert [Mon, 22 Mar 2021 07:53:14 +0000 (08:53 +0100)]
luci-app-eoip: fix i18n for en

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agoMerge pull request #4932 from TDT-AG/pr/20210318-openwrt-21.02-luci-app-watchcat
Florian Eckert [Mon, 22 Mar 2021 07:48:23 +0000 (08:48 +0100)]
Merge pull request #4932 from TDT-AG/pr/20210318-openwrt-21.02-luci-app-watchcat

luci-app-watchcat: add support for new features and convert to JavaScript

3 years agoluci-app-watchcat: change interface selection to device 4932/head
Florian Eckert [Mon, 22 Mar 2021 07:21:24 +0000 (08:21 +0100)]
luci-app-watchcat: change interface selection to device

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

3 years agoluci-app-watchcat: fix render fails with XHTML themes
Florian Eckert [Mon, 22 Mar 2021 07:16:13 +0000 (08:16 +0100)]
luci-app-watchcat: fix render fails with XHTML themes

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

3 years agoluci-app-opkg: fix parsing empty package repository indexes
Jo-Philipp Wich [Sat, 20 Mar 2021 16:15:48 +0000 (17:15 +0100)]
luci-app-opkg: fix parsing empty package repository indexes

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

3 years agoluci-app-attendedsysupgrade: sync with master branch
Paul Spooren [Wed, 10 Feb 2021 03:45:52 +0000 (17:45 -1000)]
luci-app-attendedsysupgrade: sync with master branch

Use new LuCI JavaScript code instead of a mix of Lua and JS.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoluci-app-watchcat: add support for new features and convert to JavaScript
Nicholas Smith [Mon, 14 Dec 2020 01:39:09 +0000 (11:39 +1000)]
luci-app-watchcat: add support for new features and convert to JavaScript

Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
(cherry picked from commit d5c763ee1dc3f90ae3f493400895440f4082c4b4)

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Remove po file changes. Does not apply clean. To many changes.

3 years agoluci-mod-system/zram: remove zram_comp_streams
Rui Salvaterra [Sun, 14 Mar 2021 12:38:28 +0000 (14:38 +0200)]
luci-mod-system/zram: remove zram_comp_streams

Zram uses per-CPU compression streams [1]. This is a no-op.

[1] https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=116191eddf9d8ddba61de788824dea442b265936

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
(cherry picked from commit 4bf84e29eaab32f97f54facd754c1969d9dde9a5)

3 years agoluci-mod-system/zram: replace deflate with zstd
Rui Salvaterra [Tue, 2 Mar 2021 09:31:22 +0000 (09:31 +0000)]
luci-mod-system/zram: replace deflate with zstd

Deflate is just too slow for zram. Replace it with zstd, which is much faster at
similar compression ratios.

As a side note, this is an ugly hack. We're hard-coding compression algorithms
which might not be available in the system. The availability should be parsed
from /sys/block/zram0/comp_algorithm.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
(cherry picked from commit 02cadf67b23806b37ea71c0a16459876817b337b)

3 years agoluci-app-banip: sync with 0.7.5
Dirk Brenken [Sun, 14 Mar 2021 05:57:31 +0000 (06:57 +0100)]
luci-app-banip: sync with 0.7.5

* change the wording for black- and whitelist (domain names now
  supported as well as input for IPsets
* sync translations

Signed-off-by: Dirk Brenken <dev@brenken.org>
3 years agotreewide: i18n translation backport and sync
Hannu Nyman [Sat, 13 Mar 2021 07:42:16 +0000 (09:42 +0200)]
treewide: i18n translation backport and sync

Backport translations from master and sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoMerge pull request #4907 from stangri/21.02-luci-app-vpn-policy-routing
Stan Grishin [Sat, 13 Mar 2021 03:06:21 +0000 (19:06 -0800)]
Merge pull request #4907 from stangri/21.02-luci-app-vpn-policy-routing

[21.02] luci-app-vpn-policy-routing: explicit package version

3 years agoMerge pull request #4904 from stangri/21.02-luci-app-simple-adblock
Stan Grishin [Sat, 13 Mar 2021 03:06:02 +0000 (19:06 -0800)]
Merge pull request #4904 from stangri/21.02-luci-app-simple-adblock

[21.02] luci-app-simple-adblock: explicit package version

3 years agoMerge pull request #4901 from stangri/21.02-luci-app-https-dns-proxy
Stan Grishin [Sat, 13 Mar 2021 03:05:44 +0000 (19:05 -0800)]
Merge pull request #4901 from stangri/21.02-luci-app-https-dns-proxy

[21.02] luci-app-https-dns-proxy: explicit package version

3 years agoMerge pull request #4898 from stangri/21.02-luci-app-advanced-reboot
Stan Grishin [Sat, 13 Mar 2021 03:05:24 +0000 (19:05 -0800)]
Merge pull request #4898 from stangri/21.02-luci-app-advanced-reboot

[21.02] luci-app-advanced-reboot: explicit package version

3 years agoluci-theme-openwrt-2020: add missing css success color
Florian Eckert [Thu, 11 Mar 2021 10:06:04 +0000 (11:06 +0100)]
luci-theme-openwrt-2020: add missing css success color

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

3 years agoluci-app-vpn-policy-routing: explicit package version 4907/head
Stan Grishin [Wed, 10 Mar 2021 15:21:24 +0000 (15:21 +0000)]
luci-app-vpn-policy-routing: explicit package version

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-app-simple-adblock: explicit package version 4904/head
Stan Grishin [Wed, 10 Mar 2021 15:20:11 +0000 (15:20 +0000)]
luci-app-simple-adblock: explicit package version

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-app-https-dns-proxy: explicit package version 4901/head
Stan Grishin [Wed, 10 Mar 2021 15:19:16 +0000 (15:19 +0000)]
luci-app-https-dns-proxy: explicit package version

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-app-advanced-reboot: explicit package version 4898/head
Stan Grishin [Wed, 10 Mar 2021 15:10:45 +0000 (15:10 +0000)]
luci-app-advanced-reboot: explicit package version

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoMerge pull request #4883 from stangri/21.02-luci-app-https-dns-proxy
Stan Grishin [Wed, 10 Mar 2021 04:35:40 +0000 (20:35 -0800)]
Merge pull request #4883 from stangri/21.02-luci-app-https-dns-proxy

[21.02] luci-app-https-dns-proxy: bugfix: layout issues on theme-openwrt-2020

3 years agoMerge pull request #4886 from stangri/21.02-luci-app-simple-adblock
Stan Grishin [Wed, 10 Mar 2021 04:35:22 +0000 (20:35 -0800)]
Merge pull request #4886 from stangri/21.02-luci-app-simple-adblock

[21.02] luci-app-simple-adblock: bugfix: template layout on theme-openwrt-2020

3 years agoMerge pull request #4889 from stangri/21.02-luci-app-vpn-policy-routing
Stan Grishin [Wed, 10 Mar 2021 04:35:02 +0000 (20:35 -0800)]
Merge pull request #4889 from stangri/21.02-luci-app-vpn-policy-routing

[21.02] luci-app-vpn-policy-routing: bugfix: template layout on theme-openwrt-2020

3 years agoluci-app-vpn-policy-routing: bugfix: template layout on theme-openwrt-2020 4889/head
Stan Grishin [Mon, 8 Mar 2021 10:48:58 +0000 (10:48 +0000)]
luci-app-vpn-policy-routing: bugfix: template layout on theme-openwrt-2020

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-app-simple-adblock: bugfix: template layout on theme-openwrt-2020 4886/head
Stan Grishin [Mon, 8 Mar 2021 10:46:33 +0000 (10:46 +0000)]
luci-app-simple-adblock: bugfix: template layout on theme-openwrt-2020

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-app-https-dns-proxy: bugfix: layout issues on theme-openwrt-2020 4883/head
Stan Grishin [Mon, 8 Mar 2021 10:42:05 +0000 (10:42 +0000)]
luci-app-https-dns-proxy: bugfix: layout issues on theme-openwrt-2020

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoMerge pull request #4854 from EricLuehrsen/unbound_luci_2102
Dirk Brenken [Sun, 7 Mar 2021 06:29:14 +0000 (07:29 +0100)]
Merge pull request #4854 from EricLuehrsen/unbound_luci_2102

[openwrt-21.02] luci-app-unbound: fix interface selections to match UCI

3 years agoluci-app-unbound: fix interface selections to match UCI 4854/head
Eric Luehrsen [Mon, 1 Mar 2021 02:25:44 +0000 (21:25 -0500)]
luci-app-unbound: fix interface selections to match UCI

Signed-off-by: Eric Luehrsen <ericluehrsen@gmail.com>