14822 Commits

Author SHA1 Message Date
Paul Spooren
0ac075009e luci-app-attendedsysupgrade: show position in queue
The server provides a queue_position argument, show it.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 53ff7ca676d10fa253d3ab472b9b5645996527ed)
2021-08-23 09:28:29 -10:00
Paul Spooren
624578d309 luci-app-attendedsysupgrade: add timeout and catch
If the upgrade server API does not respond, show an error message.
Fix #5222

While at it, minimal code linting

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit ff24b78c807a52a0f9afb62ba0aba1085d9ad045)
2021-08-23 09:28:29 -10:00
Dirk Brenken
ed43006d9c
luci-app-travelmate: sync with travelmate 2.0.6
* a few (visual) fixes reported in the forum
* emphasize normal uplinks in blue, vpn uplinks in green
* sync translations

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit f1d1e752b8b08b7803b6c027d9c44dded97d2a4c)
Signed-off-by: Dirk Brenken <dev@brenken.org>
2021-08-22 09:19:15 +02:00
Dirk Brenken
8eb2c94e48
luci-app-travelmate: sync with travelmate 2.0.5-3
* adapt the travelmate UI to support the changed 'trm_maxscan' option

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit fd7494ffb19d1c0197ddcb048c381b44cdb205e5)
Signed-off-by: Dirk Brenken <dev@brenken.org>
2021-08-22 09:14:54 +02:00
Vladislav Grigoryev
422c1752a6 luci-base: support loopback by widgets.NetworkSelect
Support the "loopback" interface by "widgets.NetworkSelect".
Enable the "loopback" option to include this interface.
Can be used to configure interface binding for services.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
(cherry picked from commit 376af36975579008e3176a860ae032759d27dcbb)
2021-08-19 09:17:21 +02:00
Ansuel Smith
c3580ee68f luci-mod-system: hide unsupported option on flash.js
Hide unsupported option when /rom is not used in flash.js

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>

(cherry picked from commit 82035eec6150fef1319e6fcec324124f82ada754)
2021-08-18 20:46:04 +03:00
Ansuel Smith
6389826039 luci-mod-system: improve sysupgrade page
- Add missing -k and -u option from sysupgrade page.
- Fix missing check for image verification exit code
- Provide the actual reason of the image verification

Fixes: #4160

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>

(cherry picked from commit 0f4f6e89f15aa1dac0bfd676cb8364ef0b6c6e1f)
2021-08-18 20:45:18 +03:00
Florian Eckert
854399a329 luci-mod-battstatus: chmod battstatus.js to 644
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 7f5751c16f9c883728ab67cab8b3c717aaf6a590)
2021-08-17 12:11:14 +02:00
Florian Eckert
630a5755ed luci-mod-battstatus: fix quotation marks
Fixes output on i18n generation:
standard input:56: warning: RegExp literal terminated too early

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 7e1e83fcb8b3e4229dd1bf9218e1b256f81deda6)
2021-08-17 12:11:03 +02:00
Dirk Brenken
83d631be9d
luci-app-travelmate: sync with travelmate 2.0.5
* support new features of travelmate 2.0.5
* made the station manager more comfortable
* a few minor bugfixes
* sync translations

Signed-off-by: Dirk Brenken dev@brenken.org
Signed-off-by: Dirk Brenken <dev@brenken.org>
2021-08-13 11:35:04 +02:00
Hannu Nyman
98e8ded2a9 treewide: i18n - Sync and backport translations
Sync translations.
Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-08-10 22:08:54 +03:00
Helge Mader
085bb7ce65 luci-proto-bonding: bugfix xmit_hash_policy dependencies
Signed-off-by: Helge Mader <ma@dev.tdt.de>
(cherry picked from commit adaf3feb65918bd56ac3a24ac4fc68820f794a6e)
2021-08-10 09:48:42 +02:00
Helge Mader
843d11234f luci-proto-bonding: fix member because of API change
Signed-off-by: Helge Mader <ma@dev.tdt.de>
(cherry picked from commit 64a066c33972ce803b3e78292081285e5013b4aa)
2021-08-10 09:48:29 +02:00
Jo-Philipp Wich
119701cce3 luci-mod-network: fix legacy_rates option dependency
The recently introduced band option support changed the internal frequency
selector choice values, breaking the legacy rates option dependency.

Fixes: #5234
Fixes: 0829d31290 ("luci-mod-network: support newer wireless.wifi-device.band option")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit fd2e755b6f30d80ffdf15536669fdb739212ac96)
2021-08-09 19:44:22 +02:00
Stan Grishin
5b65405337
Merge pull request #5227 from stangri/21.02-firewall
[21.02] luci-app-firewall: replace hh.mm.ss with hh:mm:ss
2021-08-04 13:24:34 -07:00
Stan Grishin
deaa1799da luci-app-firewall: replace hh.mm.ss with hh:mm:ss
Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-08-04 20:20:13 +00:00
Stan Grishin
68d75022f7
Merge pull request #5217 from stangri/21.02-luci-app-https-dns-proxy
[21.02] luci-app-https-dns-proxy: update to 2021-07-29-1
2021-08-01 22:58:55 -07:00
Stan Grishin
756063c9f8 luci-app-https-dns-proxy: update to 2021-07-29-1
* add HTTP/2-only supporting providers: Mullvad, Digitale-Gesellschaft, dns.sb and Rubyfish.cn
* switch default provider from Google to Cloudflare
* add IPv6 addresses for bootstrap resolvers for Google DNS
* add secondary bootstrap resolver (Cloudflare's) to all providers with a single bootstrap resolver
* modify model/cbi file to show HTTP/2-only providers (and help texts) on HTTP/2-supporting systems

Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-07-31 10:58:06 +00:00
Paul Spooren
132c72c7b7 luci-app-attendedsysupgrade: fix empty array condition
In JavaScript (other than in Python) an empty array is considered `true`
within if statements. Fix this by checking for the array length rather
than its existence.

This fixes the issue of an empty dropdown menu in case the user is
running the latest release.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 7f5becc69e004f831c9dc09e0859c179b439c7d2)
2021-07-26 14:02:22 +02:00
Huangbin Zhan
f543a84c5b luci-app-attendedsysupgrade: remove depends uhttpd-mod-ubus
Remove depenedency uhttpd-mod-ubus which is not required.
User may want to work with nginx rather uhttpd.

Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
(cherry picked from commit 9866bfe13ce2bed07453cce968f670e00a0d7517)
2021-07-26 14:02:22 +02:00
Paul Spooren
2d8cde2c72 luci-app-attendedsysupgrade: fix ACL definition
Fix the ACL file which handles the permissions for the LuCI app.

Suggested-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 02de3e4a2b08d2fb9d4f08b83a2526337671b6e2)
2021-07-26 14:02:22 +02:00
Hannu Nyman
1dd9ca363d treewide: i18n - Backport translations
Backport translations from master.
Sync translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-07-22 00:30:08 +03:00
Jo-Philipp Wich
de8bc46aec luci-mod-system: reload crond upon saving crontab
Fixes: #5184
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 8d4ac60f7a02e5c8e3d186f4009b4696b098152d)
2021-07-15 11:59:56 +02:00
Jo-Philipp Wich
1d6053ecd9 luci-app-acl: remove support for plaintext login passwords
Upon reviewing the rpcd session support code, it turns out that account
definitions with plaintext password values are not supported, the password
value is treated as crypt() hash/salt in any case.

Ref: https://github.com/openwrt/luci/issues/5179
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f74b06cb92e403fa281414d5a6bd57228858bfa7)
2021-07-13 20:47:18 +02:00
Dirk Brenken
07063ae51c
luci-app-adblock: expose dns instance option
* expose the 'adb_dnsinstance' option to LuCI under
  Advanced DNS Settings (only relevant for dnsmasq)
* sync translations

Signed-off-by: Dirk Brenken <dev@brenken.org>
2021-07-10 16:30:02 +02:00
Anton Kikin
19331bd029 luci-app-nlbwmon: Add translation context for Download/Upload terms
Added a translation context for the terms 'Download' and 'Upload'
used in this application. The reason is that these terms are
translated differently in Russian depending on the context.

If the terms are used in the sense of an action (download file
or upload file) then the translations should be as follows:
- Download = скачать
- Upload   = загрузить

But if they are used in the context of a traffic counter (like
in this application) the correct translations are:
- Download = скачано
- Upload   = загружено

A translation context has been added to all affected PO files
to avoid breaking existing translations. The Russian translation
in PO file is fixed to comply with the used context.

Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
(cherry picked from commit fb52e86b54f25e8fb2f46c857af20dd3b4ddb022)
2021-07-07 17:20:22 +02:00
Jo-Philipp Wich
f161b40e4c luci-app-sqm: only reload view once sqm enable/start completed
Chain the exec calls to enable and start the SQM service and only reload
the view once these operations are complete and return the entire promise
chain from the handler function to ensure that the busy indicator remains
active throughout the entire duration of the operation.

Also replace exec_direct() with exec() as there is no need to bypass ubus
for the init script calls.

Fixes: e76d9cc767 ("luci-app-sqm: fix JS error if service is disabled")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 005c09a293d1d0f4a5a76e210e0fa23842f13cb3)
2021-07-07 17:20:09 +02:00
Dirk Brenken
0d45661369 luci-app-sqm: fix JS error if service is disabled
* fix a 'resource not found error' if the sqm service has been disabled
  and the dir '/var/run/sqm/available_qdiscs' not exist
* inform the user about this issue and provide a button
  to enable & start the service

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit e76d9cc7673ffbebd8887bcfc14542c1269288e0)
2021-07-07 17:20:09 +02:00
Florian Eckert
e52e1de53a luci-base: do not add validation for named section if readonly is set
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 1a2b7fef6cc181f7f0ff0e1133ad4d8ab03e279c)
2021-07-07 17:18:19 +02:00
Helge Mader
56f453ad13 luci-base: prevent empty field for adding new named section in JavaScript
Suggested-by: Helge Mader <ma@dev.tdt.de>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 87215e3d1bd2406c4a5ae5088e176fb4aefbe546)
2021-07-07 17:18:16 +02:00
Florian Eckert
215a3141f0 luci-base: change css class btn to cbi-button
The css class btn is only a valid input element on lua rendered pages.
Use instead cbi-button for javascript rendered pages.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 80262bb9a7e63eeee0e1fa5f290b27a569a644bf)
2021-07-07 17:18:13 +02:00
Florian Eckert
c6b41bdecb luci-base: use button tag instead of input tag on named section add
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 97e673b72cc96f5f866df7e990a51fa65bff5b5f)
2021-07-07 17:18:10 +02:00
Florian Eckert
5e1356fe51 luci-app-acl: unset read and write before acl set
If the setting in the view is set to `denied`, only the read list option
is deleted. This is not correct. The write list option must also be
deleted. To ensure that the correct configuration is saved, the write
and read list options are always deleted beforehand and then rewritten.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit f4e8fcb6b53780bd2d126b22a89c379cd7c071d7)
2021-07-07 17:18:03 +02:00
Jo-Philipp Wich
eafe171160 luci-mod-status: disable "Set static" lease action on readonly view
Fixes: f6b6a12927 ("luci-mod-status: add support for one-click static lease")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a6d957d6f59329cc16c838afe3c88c6072fad236)
2021-07-07 17:17:16 +02:00
Jo-Philipp Wich
2b87ea0fc2 luci-app-acl: ensure to set read/write ACL presets as uci lists
The rpcd daemon expects uci list notation for the login.read and login.write
options, so ensure to set them accordingly when chosing the `full access` or
`readonly` presets while configuring an account.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9922c838cd1abcda60f4e93b89b0c52a101fc667)
2021-07-07 17:17:13 +02:00
DeYu Liu
720a57647b luci-base: Fix time display error
Signed-off-by: DeYu Liu <vito_sam@outlook.com>
(cherry picked from commit 0e4b4c5b42f9d8b93a4936c4b2d63f9a90c5a61b)
2021-07-07 17:17:09 +02:00
Jo-Philipp Wich
1fed9af22c luci-base: validation: disallow mutlicast MACs by default
Extend the MAC address validator to disallow multicast MAC addresses and
add a new optional validator option to require multicast MACs instead of
unicast ones.

Fixes: #5166
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 00e41c3c4977f75e6ca43429dd4c8c2f5cb22419)
2021-07-07 17:17:02 +02:00
Dirk Brenken
d9430378f9 luci-app-openvpn: create base directory if not available
* trivial fix for never ending ticket #3454

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit b6f36ca91b74e708cb8866a0299923dab3f5343b)
2021-07-07 17:17:02 +02:00
Paul Spooren
a56934fb0f luci-app-attendedsysupgrade: fix typo
Suggested-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit cef330a1c8b59b0b84bb862b8d04b56892be3803)
2021-07-06 17:46:42 -10:00
Jo-Philipp Wich
afea1dac74 Revert "luci-mod-network: issue with breakdown of dnsmasq after duplication of static IP was fixed"
This reverts commit 463e910119813aaea0755ff5c16c91ce412a8cbb.

This change causes the entire static lease to get deleted when attempting
to change the MAC address.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 91f46d765b36825fcfe63e2b7d4863de00cdc69d)
2021-07-03 07:21:24 +02:00
Jo-Philipp Wich
0ededb9bcc luci-mod-network: fix saving bridge VLANs without member ports
Calling `uci.set()` with an empty array yields an invalid argument error,
make sure to pass `null` instead in this case.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f1f566bfe2a6b0960ba95a5ea05ca4353b766867)
2021-07-02 20:48:09 +02:00
Jo-Philipp Wich
ae00d0f712 luci-mod-network: work around jsmin bug
The jsmin minifier incorrectly transforms the expression `/\*/.test(...)`
into `/\* /.test(...)`, causing the VLAN filter dialog to not recognize
PVID settings in the configuration.

Work around the issue by using an equivalent `\x2a` escape sequence instead.

Ref: https://forum.openwrt.org/t/x/99222/28
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2869c9cf324a9e057567075d4977c7cc40140938)
2021-07-02 20:48:09 +02:00
Jo-Philipp Wich
f66be1fe72 treewide: fix typo in "Enable VLAN filtering" label
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit c48d8f4a2c9a771c8c03a76eb1b554f62d57140b)
2021-07-01 21:16:56 +02:00
Jo-Philipp Wich
d1d452ed2f luci-mod-status: don't set '-' hostname when creating static lease
Fixes: #5153
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e3357deb7d273b6a982dfaf9800c83eba85fe6b2)
2021-07-01 21:15:25 +02:00
Jo-Philipp Wich
49aa9c61db luci-mod-network: enforce IPv4 mode for traceroute call
Recent busybox traceroute applet versions support both IPv4 and IPv6 and
default to IPv6 when running a route trace to an IPv6 enabled target
host. Pass the `-4` flag to enforce IPv4 mode in this case.

Fixes: #5155
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c4f429461545d1401429e7ba133f24a55d1015b6)
2021-07-01 21:15:15 +02:00
Jo-Philipp Wich
165e411cd4 luci-mod-network: parse ports without tag/pvid annotation as well
Fixes: 01eac366f6 ("luci-mod-network: fix tagging/pvid state parsing in bridge-vlan ports")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e57f8663afd53cc7421debcd63444e1d136f5dec)
2021-07-01 21:15:04 +02:00
Jo-Philipp Wich
4c05263573 luci-mod-network: fix tagging/pvid state parsing in bridge-vlan ports
The previous code naively looked for a `t` in the entire port spec,
wrongly matching untagged ports having a `t` in their name, such
as `eth0`.

Rework the logic to be more strict when parsing the port member
specification to avoid this issue.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 01eac366f69ba58c090ddc2cb70aeb069adbdd5a)
2021-07-01 21:15:04 +02:00
Jo-Philipp Wich
ccf7c1e036 luci-mod-network: refactor device configuration
Since all netifd device types inherit generic device settings, we can
simplify various aspects of the device configuration ui and drop unused
code while we're at it.

 - Remove setIfActive() helper, superseded by commit
   f3f74bd0fe ("luci-base: form.js: consider aliased options in AbstractValue.remove()")

 - Remove most dependency constraints to make all generic device settings
   available for all device types

 - Add MTU value validation to disallow exceeding parent device MTU for
   VLAN interfaces

 - Dynamically update placeholder values when changing base or parent
   device options

 - Undo VLAN network config hack since all options are available now.
   Reverts commit
   3c6b59504a ("luci-mod-interfaces: simplify configuring MAC address of 802.1q devices")

 - Do not suggest inactive wireless networks as existing device or base
   device choices

 - Disallow specifying names of already existing network devices when
   creating new device settings

 - Fix a number of multicast dependency specifications

 - Drop now unused functions

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f689d0d208acbf9934da5a2d49c8717c054be585)
2021-07-01 21:15:04 +02:00
Jo-Philipp Wich
0eb87ea65e luci-mod-network: change port status layout in vlan filter config
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 36350e9867ca9fd2f9b137ed76f0fabe0e57c880)
2021-07-01 21:15:04 +02:00
Jo-Philipp Wich
8504470ad8 build: add script to find commits suitable for cherry picking
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0ead87320bade6f924991f4310271582a760edb4)
2021-07-01 21:13:56 +02:00