Commit graph

14994 commits

Author SHA1 Message Date
Jo-Philipp Wich
59c838b52a build: introduce official way to opt out of source minification
Introduce three new default enabled variables `LUCI_MINIFY_JS`,
`LUCI_MINIFY_LUA` and `LUCI_MINIFY_CSS`  that allow LuCI component
Makefiles to opt out of JavaScript, Lua and CSS compression respectively.

To e.g. inhibit CSSTidy postprocessing in a theme, the corresponding
Makefile can set `LUCI_MINIFY_CSS:=0` prior to including `luci.mk`.

Fixes: #5755
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3646b0cd1f)
2022-04-06 11:42:57 +02:00
Paul Spooren
bb6ef9fcc6 luci-app-attendedsysupgrade: request filesystem
It is possible to request a specific filesystem so no other filesystems
are used. This speeds up the build process and may prevent failures in
edge cases.

A recent edge case is installing more packages than ext4 can handle
while squashfs works fine due to compression.

Backport `procd` detection of `rootfs_type` to JavaScript:
https://git.openwrt.org/?p=project/procd.git;a=blob;f=system.c;h=93eac59c3b01ce3729dc27539ac483f5314759d3;hb=HEAD#l49

Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-03-31 16:28:19 +01:00
Jo-Philipp Wich
3856d504d2 luci-app-firewall: fix misspelling of restrictions
Fixes: #5749
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 0eb3aeb010)
2022-03-30 20:49:01 +02:00
Hannu Nyman
f4a5b6c435 treewide: Backport translations
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-03-26 08:52:33 +02:00
Jo-Philipp Wich
f1d687eeae luci-theme-bootstrap: fix incorrect wrap arounds in nested cbi sections
Fixes: #5743
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 8e09f1833b)
2022-03-25 11:50:47 +01:00
Hannu Nyman
0a0ce2ae6e timezone data: update to 2022a
Update timezone data to 2022a.

http://mm.icann.org/pipermail/tz-announce/2022-March/000070.html
* Palestine will spring forward on 2022-03-27, not 2022-03-26.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 15bbe6979b)
2022-03-24 21:12:18 +02:00
Paul Spooren
701ea947fc luci-app-attendedsysupgrade: fix missing efi path
If running on a non EFI system, the file `/sys/firmware/efi` is not
available and therefore results in an error of `fs.stat`. Wrap it with
`L.resolveDefault` to avoid the error message and make it work on
non-EFI devices again.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 65266c490a)
2022-03-14 12:05:28 +01:00
Paul Spooren
ce3599093d luci-app-attendedsysupgrade: LuCIfy codebase
This should make the code a bit more readable and LuCI like instead of
using plain JavaScript.

Handle the filesystem correctly to avoid installing suqashfs images on
ext4 devices and the other way around, also recognize systems running
efi.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit de3e0bbffd)
2022-03-14 12:05:28 +01:00
Hannu Nyman
9be6f29162 treewide: Backport and sync translations - i18n
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-03-13 18:20:22 +02:00
k-ronny
8cac3cbc19 luci-app-statistics: irq plugin: handle numeric interrupt names
the `irq` plugin does not show the right data if the interrupt name is only numeric

Signed-off-by: Ronny Kotzschmar <ro.ok@me.com>
(cherry picked from commit dc25703053)
Fixes #5719
2022-03-13 18:14:24 +02:00
Stan Grishin
2044c3439d
Merge pull request #5627 from stangri/openwrt-21.02
[21.02] luci-app-https-dns-proxy: massive providers update
2022-02-22 18:41:39 -08:00
Jo-Philipp Wich
2dba71e4e8 luci-theme-bootstrap: fix display glitch with combo buttons in row actions
Fixes: #5693
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit edbde448b8)
2022-02-21 23:43:22 +01:00
Jo-Philipp Wich
31a27f3087 luci-base: properly handle promise targets in Request.request()
Under some circumstances, ubus RPC requests may be initiated while LuCI is
still resolving the `rpcBaseURL` value. In this situation, the `target`
argument of the `request()` call will be a pending promise object which
results in an invalid URL when serialized by `expandURL()`, leading to an
`Failed to execute 'open' on 'XMLHttpRequest': Invalid URL` exception.

This commonly occured on the index status page which immediately initiates
ubus RPC calls on load to discover existing status page partials.

Solve the issue by filtering the given `target` argument through
`Promise.resolve()` before expanding the URL and initiating the actual
request.

Fixes: #3747
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 5663fd596b)
2022-02-21 15:06:41 +01:00
Jo-Philipp Wich
cc582ebfb3 luci-theme-bootstrap: fix style quirk introduced by backport
Fixes: 883834c3dd ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-02-16 10:49:33 +01:00
Jo-Philipp Wich
9d5786026f treewide: resync and merge master translations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-02-16 00:58:01 +01:00
Jo-Philipp Wich
59c3392946 luci-app-firewall: fix setting unspecified zone on forwardings
Fixes: #5685
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 21784446c1)
2022-02-16 00:52:37 +01:00
Jo-Philipp Wich
161880046f luci-app-firewall: CBIProtocolSelect: properly handle unrecognized protos
Prevent incorrectly replacing unrecognized protocol numbers with -1.

Fixes: #5587
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4381816315)
2022-02-16 00:52:03 +01:00
Jo-Philipp Wich
2be076e5b1 luci-base: ui.js: avoid error tooltips overlapping dropdowns
Fixes: #5588
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 604c009059)
2022-02-16 00:51:11 +01:00
Paul Dee
0ac2542085 luci-mod-status: Add Target Platform (e.g. ath79/ipq806x/etc)
revealed under:
ubus call system board
board.release.target

Useful reminder for what to download

Signed-off-by: Paul Dee <systemcrash@users.noreply.github.com>
(cherry picked from commit 2890d1842a)
2022-02-16 00:49:44 +01:00
Helge Mader
f08a0f6b8f luci-base: prevent empty field for adding new entry
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 58447640eb)
2022-02-16 00:49:04 +01:00
Paul Spooren
274df9df00 luci-base: fix request timeout docstring
The `timeout` is defined in milliseconds, not seconds.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 292e198884)
2022-02-16 00:49:04 +01:00
Jo-Philipp Wich
92329dcd46 luci-mod-status: fix raw ipt counter buton style
Fixes: #4928
Fixes: b39b7fc0d2 ("luci-mod-status: allow displaying raw iptables counter values")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1dc16d9d3f)
2022-02-16 00:47:54 +01:00
Jo-Philipp Wich
dcd61d74dc luci-mod-status: allow displaying raw iptables counter values
Fixes: #4852
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b39b7fc0d2)
2022-02-16 00:47:42 +01:00
Jo-Philipp Wich
41f18098bb luci-theme-bootstrap: fix translation for username and password captions
Fixes: c81b09ec3d ("luci-theme-bootstrap: simplify login dialog")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 6a60d2434e)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
40051f0302 luci-theme-bootstrap: simplify login dialog
Use an traditional HTML form with post submit action to the same URL in
order to simplify the login process and not rely on the discarded login
XHR reply properly setting the login cookie.

This will also avoid one useless request on login and hopefully fix login
issues reported with various browser environments.

As a bonus, the resulting code is somewhat smaller as well.

Ref: https://forum.openwrt.org/t/login-does-not-work/113360
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c81b09ec3d)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
1390f78fad luci-theme-bootstrap: add bottom margin to log views
Prevent the log output textareas to touch the footer border.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1a9afa2a90)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
2cc139ce6a luci-theme-bootstrap: prevent hiding header bar on long vertical scrolls
Ref: b11a7d8e49 (commitcomment-60968071)
Fixes: 8055acc9be ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e0888d70a9)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
18cc1c79d7 luci-theme-bootstrap: various style corrections
- Add proper top and bottom margin for tab descriptions
 - Allow flex wrapping for cbi-value rows
 - Ensure that nested table/grid sections always take the full width
 - Make table/grid section row action buttons are as narrow as possible

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b11a7d8e49)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
119cfee890 luci-theme-bootstrap: fix cbi-value caption alignment
Since the removal of the clearfix styles, overlong captions will displace
subsequent input field rows.

Fix the issue by replace floating label + field margin with flexbox styles.

Fixes: #5535
Fixes: 8055acc9be ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4720a025e8)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
071a3b0d12 luci-theme-bootstrap: fix inner border radius in ifaceboxes, progressbars
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 6f4708ca68)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
f1e5639df1 luci-theme-bootstrap: hide scrollbars in modal overlay
Only enable scrollbars if content overflows.

Fixes: #5505
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 7f26e86a9f)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
c1745bdb85 luci-theme-bootstrap: further uci changelog style fixes
- Use the proper dialog class name to apply changelog styles
 - Darken grey background and borders

Fixes: 5bd111f58f ("luci-theme-bootstrap: fix uci changelog and readonly input styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 00dc07bb84)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
7884d8ac01 luci-theme-bootstrap: fix uci changelog and readonly input styles
- Rework uci changelog styling rules to work with unmodified markup
 - Drop redundant readonly input styles, don't fade readonly input texts

Fixes: 8055acc9be ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 5bd111f58f)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
883834c3dd luci-theme-bootstrap: overhaul styles
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 8055acc9be)
2022-02-16 00:42:42 +01:00
Jo-Philipp Wich
9775b6ab24 luci-base: apply Browser/OS dark mode preference to index redirect page
Turn white body, black link into black body, white link if the Browser/OS
indicates dark mode preference.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 50af81193c)
2022-02-16 00:37:58 +01:00
Jo-Philipp Wich
d79b81b852 luci-base: luci.js: fix undefined variable access in Request.request()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit de4c4f7fd4)
2022-02-16 00:37:54 +01:00
Jo-Philipp Wich
dd54dcef26 luci-mod-network: use firewall.getZoneColorStyle() in interface view
Use the new `firewall.getZoneColorStyle()` helper to apply background
zone color styles to the interface boxes.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 849772df96)
2022-02-16 00:37:41 +01:00
Jo-Philipp Wich
d61c4486d5 luci-app-firewall: use firewall.getZoneColorStyle() in views
Use the new `firewall.getZoneColorStyle()` helper to apply background
color styles.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0b4b6380d0)
2022-02-16 00:37:37 +01:00
Jo-Philipp Wich
4aa1c79138 luci-base: widget.js: use firewall.getZoneColorStyle() in zone widgets
Use the new `firewall.getZoneColorStyle()` helper to apply background
color styles.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a812b26cb8)
2022-02-16 00:37:33 +01:00
Jo-Philipp Wich
a6bad6d9f8 luci-base: firewall.js: add getZoneColorStyle() helper
The getZoneColorStyle() function will produce CSS style properties that
describe the color value of the zone. The color declaration is divided
into a CSS variable called `--zone-color-rgb` which holds the RGB value
of the color and a `background-color` property assigning these values
as background property.

This allows themes to override the color with derived values, e.g. by
applying an alpha channel.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d775279dbd)
2022-02-16 00:37:24 +01:00
Jo-Philipp Wich
5a092b3ad2 luci-base: add legacy directory, file and device validator JS stubs
Fixes: #5466
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ad360ec00a)
2022-02-16 00:36:34 +01:00
Jo-Philipp Wich
d1255a5f5e luci-mod-status: disable DSL status if not present
Fixes: #5465
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0ad54e4a7c)
2022-02-16 00:36:09 +01:00
Jo-Philipp Wich
c051cfc4e8 luci-base: add "dsl" system feature
Allows LuCI views to probe DSL presence using `L.hasSystemFeature('dsl')`.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d513f1461f)
2022-02-16 00:36:05 +01:00
Vladislav Grigoryev
39fae47e3d luci-mod-network: support network.interface.sourcefilter
Allow to modify the sourcefilter option in the network.interface config.
This is required for custom policy routing with IPv6 MWAN and/or NAT6.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
(cherry picked from commit 22296fb072)
2022-02-16 00:35:10 +01:00
Jo-Philipp Wich
a7b0fe1af1 protocols: make APN option optional again
Fixes: #5284
Fixes: 1661ac6bf8 ("luci-proto-ncm: add APN and PIN validation")
Fixes: 114dc38dc2 ("luci-proto-qmi: add APN and PIN validation")
Fixes: 6a8ad40b05 ("luci-proto-3g: add APN and PIN validation")
Fixes: ebb676ef7b ("luci-proto-modemmanager: add APN and PIN validation")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 5ff3ef7cbb)
2022-02-16 00:34:28 +01:00
Nicholas Smith
ebfdbce797 luci-proto-ncm: add APN and PIN validation
Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
[squash commits, fix whitespace]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1661ac6bf8)
2022-02-16 00:34:16 +01:00
Nicholas Smith
f8ea3df634 luci-proto-qmi: add APN and PIN validation
Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
[squash commits, fix whitespace]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 114dc38dc2)
2022-02-16 00:34:16 +01:00
Nicholas Smith
9a802398f1 luci-proto-3g: add APN and PIN validation
Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
[squash commits, fix whitespace]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 6a8ad40b05)
2022-02-16 00:34:16 +01:00
Nicholas Smith
badce00804 luci-proto-modemmanager: add APN and PIN validation
Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
[squash commits, fix white space]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ebb676ef7b)
2022-02-16 00:34:16 +01:00
Hannu Nyman
b55a1dc155 treewide: Backport i18n translations
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-02-13 12:21:17 +02:00