Commit graph

15997 commits

Author SHA1 Message Date
Jo-Philipp Wich
815028ef93 luci-base: runtime.uc: avoid Lua not installed exeption from trycompile()
Make sure to request loading the Lua bridge as optional when initializing
the Lua VM context from trycompile() in order to not raise a fatal exception
in case the Lua runtime support is not present.

Ref: https://forum.openwrt.org/t/x/141426
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-11-02 10:21:05 +01:00
Jo-Philipp Wich
c99602e4ac luci-base: dispatcher.uc: apply ACLs to menu tree JSON
Add menu tree annotations for node readonly and dependency satisfied state
in order to ensure that unreachable menu nodes are hidden from view.

Fixes: ded8ccf93e ("luci-base-ucode: add initial ucode based LuCI runtime")
Ref: https://forum.openwrt.org/t/x/141426/10
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-11-02 10:13:41 +01:00
Jo-Philipp Wich
d967bbaa92 luci-base: http.uc: fix invoking Lua file upload callbacks
In case a callback is installed from Lua code, the received callback
argument is not a callable function but a resource object with a call
method. Attempts to call it will leading to a `Type error: left-hand
side is not a function` error.

To solve this issue, invoke the internally set filehandler instead
which wraps the resource if needed.

Fixes: #6067
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-11-02 09:08:16 +01:00
Zhang Rui
37a836c0c0 luci-app-https-dns-proxy: add cn.edu.tsinghua.tuna.dns.lua provider
Signed-off-by: Zhang Rui <rui.crater@gmail.com>
2022-11-02 15:24:31 +08:00
Hannu Nyman
da41c11971 timezone data: update to 2022f
Update timezone data to 2022f.
* http://mm.icann.org/pipermail/tz-announce/2022-October/000075.html

 -   Mexico will no longer observe DST after 2022, except for areas
     near the US border that continue to observe US DST rules.
     On 2022-10-30 at 02:00 the Mexican state of Chihuahua moves
     from -07 (-06 with DST) to year-round -06.
 -   Fiji will not observe DST in 2022/3.
     For now, assume DST is suspended indefinitely.
 -   Simplify four Ontario zones.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-10-31 20:04:10 +02:00
Hosted Weblate
53a541bbe8 Translated using Weblate (Danish)
Currently translated at 100.0% (110 of 110 strings)

Translation: OpenWrt/LuCI/applications/simple-adblock
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationssimple-adblock/da/

Translated using Weblate (Danish)

Currently translated at 100.0% (2075 of 2075 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/da/

Translated using Weblate (Danish)

Currently translated at 100.0% (192 of 192 strings)

Translated using Weblate (Danish)

Currently translated at 100.0% (33 of 33 strings)

Translated using Weblate (Korean)

Currently translated at 33.2% (689 of 2075 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/ko/

Translated using Weblate (Japanese)

Currently translated at 79.9% (1658 of 2075 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/ja/

Translated using Weblate (German)

Currently translated at 90.0% (172 of 191 strings)

Translation: OpenWrt/LuCI/applications/travelmate
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationstravelmate/de/

Translated using Weblate (Polish)

Currently translated at 100.0% (110 of 110 strings)

Translation: OpenWrt/LuCI/applications/simple-adblock
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationssimple-adblock/pl/

Translated using Weblate (Turkish)

Currently translated at 100.0% (110 of 110 strings)

Translation: OpenWrt/LuCI/applications/simple-adblock
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationssimple-adblock/tr/

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (197 of 197 strings)

Translation: OpenWrt/LuCI/applications/ddns
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsddns/zh_Hans/

Translated using Weblate (Turkish)

Currently translated at 100.0% (197 of 197 strings)

Translation: OpenWrt/LuCI/applications/ddns
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsddns/tr/

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (197 of 197 strings)

Translation: OpenWrt/LuCI/applications/ddns
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsddns/pt_BR/

Translated using Weblate (Polish)

Currently translated at 100.0% (197 of 197 strings)

Translation: OpenWrt/LuCI/applications/ddns
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsddns/pl/

Translated using Weblate (German)

Currently translated at 100.0% (197 of 197 strings)

Translation: OpenWrt/LuCI/applications/ddns
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsddns/de/

Translated using Weblate (Chinese (Simplified))

Currently translated at 99.0% (109 of 110 strings)

Translation: OpenWrt/LuCI/applications/simple-adblock
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationssimple-adblock/zh_Hans/

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (110 of 110 strings)

Translation: OpenWrt/LuCI/applications/simple-adblock
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationssimple-adblock/pt_BR/

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (192 of 192 strings)

Translated using Weblate (Turkish)

Currently translated at 100.0% (192 of 192 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (192 of 192 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (192 of 192 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (192 of 192 strings)

Translated using Weblate (Spanish)

Currently translated at 99.4% (191 of 192 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (33 of 33 strings)

Translated using Weblate (Turkish)

Currently translated at 100.0% (33 of 33 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (33 of 33 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (33 of 33 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (33 of 33 strings)

Translated using Weblate (Spanish)

Currently translated at 96.9% (32 of 33 strings)

Translated using Weblate (Turkish)

Currently translated at 100.0% (2075 of 2075 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/tr/

Translated using Weblate (German)

Currently translated at 97.0% (2013 of 2075 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/de/

Co-authored-by: Eric <hamburger1024@mailbox.org>
Co-authored-by: Franco Castillo <castillofrancodamian@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Co-authored-by: Matthaiks <kitynska@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Co-authored-by: drax red <drax@outlook.dk>
Co-authored-by: orangepizza <abnoeh@mail.com>
Co-authored-by: sergio <sergio+it@outerface.net>
Co-authored-by: ssantos <ssantos@web.de>
Co-authored-by: tdt-hv <hvoit@tdt.de>
Signed-off-by: Eric <hamburger1024@mailbox.org>
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Matthaiks <kitynska@gmail.com>
Signed-off-by: Oğuz Ersen <oguz@ersen.moe>
Signed-off-by: Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Signed-off-by: drax red <drax@outlook.dk>
Signed-off-by: orangepizza <abnoeh@mail.com>
Signed-off-by: ssantos <ssantos@web.de>
Signed-off-by: tdt-hv <hvoit@tdt.de>
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationscommands/da/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationscommands/es/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationscommands/pl/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationscommands/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationscommands/ru/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationscommands/tr/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationscommands/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsopenvpn/da/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsopenvpn/es/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsopenvpn/pl/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsopenvpn/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsopenvpn/ru/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsopenvpn/tr/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsopenvpn/zh_Hans/
Translation: OpenWrt/LuCI/applications/commands
Translation: OpenWrt/LuCI/applications/openvpn
2022-10-30 00:02:39 +03:00
Florian Eckert
a07129b191
Merge pull request #5965 from jempatel/luci-app-keepalived
luci-app-keepalived: Add LuCI for keepalived
2022-10-28 12:57:14 +02:00
Florian Eckert
1d157d3a50
Merge pull request #6047 from systemcrash/luci-mod-network-relay
luci-mod-network: 'relay' tab added
2022-10-28 11:02:47 +02:00
Paul Dee
a627744bb5 luci-mod-network: 'relay' tab added
Adds LuCI GUI for dnsmasq DHCP 'relays'.

The helper functions in dnsmasq/files/dnsmasq.init limit behaviour
whereby it is not possible to omit server_addr, where to omit
it (dnsmasq supported) would result in a broad- or multicast further on.

Tested on 22.03.2

Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com>
2022-10-28 01:38:07 +02:00
Jo-Philipp Wich
9af8486517 luci-mod-network: gracefully handle empty channel lists
Avoid undefined value access when the channel list is empty.

Fixes: #5937, #5951
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-27 16:10:47 +02:00
Florian Eckert
4d6a238098 luci-app-nextdns: sync i18n
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 14:06:38 +02:00
Florian Eckert
05f87f37e6 luci-app-xfrpc: sync i18n
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 14:06:23 +02:00
Florian Eckert
d6136da91f luci-app-https-dns-proxy: sync i18n
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 14:06:09 +02:00
Florian Eckert
ab4678dade luci-app-frps: sync i18n
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 14:05:51 +02:00
Florian Eckert
c01c90c20a luci-app-frpc: sync i18n
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 14:05:42 +02:00
Florian Eckert
02d38c1c33 luci-app-firewall: sync i18n
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 14:05:31 +02:00
Florian Eckert
123bc9b455 luci-app-openvpn: sync i18n
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 14:05:18 +02:00
Florian Eckert
3420e7f49b luci-app-simple-adblock: sync i18n
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 14:05:06 +02:00
Florian Eckert
820b1b086b luci-app-travelmate: sync i18n
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 14:04:51 +02:00
Florian Eckert
911bea1c20 luci-app-transmission: sync i18n
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 14:04:34 +02:00
Florian Eckert
55b19eed1a luci-base: sync i18n
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 14:04:13 +02:00
Florian Eckert
531147eb3c luci-app-ddns: sync i18n
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 14:03:52 +02:00
Florian Eckert
b20b69b2fd luci-app-commands: sync i18n
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 14:03:37 +02:00
Florian Eckert
4e9aecb24b luci-app-aria2: sync i18n
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 14:03:25 +02:00
Florian Eckert
37328b5897 luci-app-adblock: sync i18n
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 14:03:05 +02:00
Florian Eckert
af5b5fbf09
Merge pull request #5430 from jeje42/feature/luci-app-openvpn-add-tls_crypt_v2-option
Add tls_crypt_v2 openvpn option to LuCI.
2022-10-27 13:19:41 +02:00
Florian Eckert
60b910ae01
Merge pull request #6051 from weblate/weblate-openwrt-luci
Translations update from Hosted Weblate
2022-10-27 13:17:42 +02:00
Hosted Weblate
e7b5467f80
Translated using Weblate (Spanish)
Currently translated at 93.3% (14 of 15 strings)

Translation: OpenWrt/LuCI/applications/example
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsexample/es/

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (62 of 62 strings)

Translation: OpenWrt/LuCI/applications/attendedsysupgrade
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsattendedsysupgrade/zh_Hans/

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (2075 of 2075 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/zh_Hans/

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (2075 of 2075 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/zh_Hans/

Translated using Weblate (Russian)

Currently translated at 100.0% (2075 of 2075 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/ru/

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (2075 of 2075 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/pt_BR/

Translated using Weblate (Polish)

Currently translated at 100.0% (2075 of 2075 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/pl/

Translated using Weblate (Spanish)

Currently translated at 96.2% (1997 of 2075 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/es/

Translated using Weblate (Turkish)

Currently translated at 100.0% (117 of 117 strings)

Translation: OpenWrt/LuCI/applications/https-dns-proxy
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationshttps-dns-proxy/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (177 of 177 strings)

Translation: OpenWrt/LuCI/applications/adblock
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsadblock/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (196 of 196 strings)

Translation: OpenWrt/LuCI/applications/ddns
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsddns/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2079 of 2079 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/tr/

Translated using Weblate (Greek)

Currently translated at 30.3% (631 of 2079 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/el/

Co-authored-by: Byacrya <byacrya@proton.me>
Co-authored-by: Eric <hamburger1024@mailbox.org>
Co-authored-by: Franco Castillo <castillofrancodamian@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Matthaiks <kitynska@gmail.com>
Co-authored-by: TakissX <pxatzidakis@gmail.com>
Co-authored-by: Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Co-authored-by: semih <semiht@gmail.com>
Co-authored-by: sergio <sergio+it@outerface.net>
Signed-off-by: Byacrya <byacrya@proton.me>
Signed-off-by: Eric <hamburger1024@mailbox.org>
Signed-off-by: Franco Castillo <castillofrancodamian@gmail.com>
Signed-off-by: Matthaiks <kitynska@gmail.com>
Signed-off-by: TakissX <pxatzidakis@gmail.com>
Signed-off-by: Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Signed-off-by: semih <semiht@gmail.com>
Signed-off-by: sergio <sergio+it@outerface.net>
2022-10-27 12:40:16 +02:00
Jo-Philipp Wich
2a5efb31b7 luci-base: always link core.so with libcrypt to satisfy glibc builds
Fixes the following runtime error on glibc based builds:

    Runtime error: Unable to dlopen file ...: undefined symbol: crypt
    In module(), file /usr/share/ucode/luci/dispatcher.uc, line 1, byte 1:
      called from anonymous function (/www/cgi-bin/luci:7:21)

Ref: https://forum.openwrt.org/t/x/137250/18
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-27 12:36:33 +02:00
Jo-Philipp Wich
1eea6c0ce8 luci-base: add ui indicator when fallback theme is used
Add a ui indicator displaying error details when the configured theme
failed to load and the next available one is being used instead.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-27 11:14:52 +02:00
Jo-Philipp Wich
bd4bf6ac9b luci-theme-material: fix location of template files
Fixes: #6060
Fixes: e496014760 ("luci-theme-material: convert Lua templates to ucode")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-27 11:14:52 +02:00
Jo-Philipp Wich
767acf32d4 luci-base: dispatcher.uc: update uci session ID in Lua context
Make sure that the uci session ID of the `luci.model.uci` module within
the Lua context is updated once we acquire the login session information.

In case legacy themes are used, the probing of the theme header template
might indirectly load the Lua runtime and the Lua side `luci.dispatcher`
module which in turn will load the `luci.model.uci` and set the session
ID there which is not yet initialized at this point in time.

This results in broken uci change handling within legacy Lua applications
when a legacy theme is loaded.

Fixes: #6060
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-27 11:14:52 +02:00
Florian Eckert
6f470e0d76 luci-mod-network: remove uppercase for interface name in modal view
Unify the network name display as shown in the overview by removing the
uppercase conversion.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-27 10:46:54 +02:00
Jo-Philipp Wich
32603718e8 luci-ssl-nginx: drop libiwinfo-lua dependency
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-26 23:41:33 +02:00
Jo-Philipp Wich
67e4e43090 luci-nginx: drop libiwinfo-lua dependency
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-26 23:41:21 +02:00
Jo-Philipp Wich
9d8feace41 luci-app-commands: drop luci-compat dependency
This custom commands application does not utilize Lua code anymore.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-26 23:16:51 +02:00
Jo-Philipp Wich
694b8086cd luci-theme-openwrt-2020: convert Lua templates to ucode
Convert the theme's Lua templates to ucode to avoid the implicit dependency
on the luci-lua-runtime package.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-26 22:43:56 +02:00
Jo-Philipp Wich
a98e2ea17d luci-lua-runtime: render cbi header/footer templates via ucode runtime
Trigger rendering of CBI header and footer templates via the ucode runtime
`include()` in order to ensure that scope data is properly inherited from
Lua templates (`cbi/header`) including ucode templates (`header`).

This fixes automatic triggering of the config apply flow on legacy Lua CBI
forms.

Ref: https://github.com/openwrt/luci/pull/6056#issuecomment-1292396588
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-26 22:02:16 +02:00
Jo-Philipp Wich
aca4591753
Merge pull request #6055 from TDT-AG/pr/20221026-luci-mod-network
luci-mod-network: remove uppercase for interface name on overview page
2022-10-26 15:39:53 +02:00
Jo-Philipp Wich
81f204d38f luci-lua-runtime: fix loading header/footer templates for SimpleForms
Fixes: #6054
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-26 15:30:11 +02:00
Jo-Philipp Wich
ca57291bdd luci-lua-runtime: ensure proper forwarding of route arguments to cbi action
Ensure that the optional cbi() `config` argument is set to an empty table
if unspecified to ensure that the static call argument array is exactly
two elements long, otherwise call arguments are shifted and the invoked
method might not receive the expected parameter.

This fixes, among others, the dispatching of `arcombine()` targets.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-26 15:12:17 +02:00
Florian Eckert
5ffaf47842 luci-mod-network: remove uppercase for interface name on overview page
In the overview page, the name of the interface is converted to
uppercase. However, this is not the name in the configuration. From my
point of view, this makes no sense. The name displayed should correspond
exactly to the name in the configuration.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-10-26 12:10:31 +02:00
Jo-Philipp Wich
3ec7bff0d1 .gitignore: adjust paths for autogenerated plural_formula sources
Ref: https://github.com/openwrt/luci/pull/5976#issuecomment-1290370037
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 13:26:56 +02:00
Jo-Philipp Wich
70e32f0cb1 luci-base: dispatcher.uc: ensure usage of dashes in language tags
The LuCI uci configuration requires language tags with underscores due
limitations of uci option names but the language catalogs themselves
are designated with dash separated language tags.

Make sure to substitute underscores with dashes when determining the
desired request language in order to fix loading of languages such as
`pt-br` or `zh-cn`.

Ref: https://github.com/openwrt/luci/pull/5976#issuecomment-1290352951
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 13:01:31 +02:00
Jo-Philipp Wich
adc4ca65bc luci-base: dispatcher.uc: reintroduce support for 'absent' fs depends
The ability to require certain paths to be absent for a menu entry to show
up was lost during the ucode conversion.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 12:50:37 +02:00
Jo-Philipp Wich
639e7faa1a luci.mk: fix compatibility with GNU Make 4.2
GNU Make version 4.2 chokes on `#` characters embedded in variable
substitutions, leading to the following error:

    ../../luci.mk:114: *** unterminated call to function 'if': missing ')'.  Stop.

Avoid this problem by replacing variable substitutions with Git branch
format arguments.

Ref: https://github.com/openwrt/luci/pull/5976#issuecomment-1289935106
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 12:20:22 +02:00
Jo-Philipp Wich
39d722e00a
Merge pull request #5976 from jow-/ucode
[RFT] Rewrite LuCI runtime in ucode
2022-10-25 01:04:07 +02:00
Jo-Philipp Wich
dd1c538b2e luci-app-commands: rewrite to client side rendering
Rewrite the luci-app-command configuration to client side cbi forms and
port the server side templates and controller logic to ucode.

Also utilize a query string parameter to pass custom arguments.

Fixes: #5559
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 01:03:38 +02:00
Jo-Philipp Wich
036424df5b treewide: add explicit Lua runtime dependencies where needed
Some packages require Lua libraries but do not ship with a luasrc directory,
add explicit dependencies in these cases.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 01:03:37 +02:00
Jo-Philipp Wich
94dd7fdf60 luci-lua-runtime: drop Lua server gateway modules
Remove the uhttpd and CGI gateway modules as they're not compatible with
the Lua compat stub runtime anymore.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 01:03:37 +02:00