summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/ucode/runtime.uc
AgeCommit message (Collapse)Author
2023-08-07luci-base: runtime.uc: fix error500() invocation on theme failureJo-Philipp Wich
In case no single theme could be loaded successfully, the runtime class failed to properly invoke the `error500()` method, which is only available through the passed environment at this point. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-11-25luci-base: only render theme specific sysauth template when it existsJo-Philipp Wich
Avoid displaying non-fatal "File not found" exceptions when a theme is not shipping an own sysauth template. Fixes: #6118 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-11-22luci-base: fix rendering ucode templates from `template` targetJo-Philipp Wich
A previous commit inadvertently broke support for rendering ucode templates from the `template` dispatcher target. Fixes: #6111 Fixes: fa17c1573f ("luci-base, luci-lua-runtime: adjust Lua template environment") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-11-03luci-base: fix luci.http.close()Jo-Philipp Wich
Ensure that `http.write()` or template rendering operations after a call to `http.close()` do not produce additional output. This is required for certain legacy Lua apps which invoke write and close operations in the middle of a server side cbi rendering process. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-11-02luci-base: runtime.uc: avoid Lua not installed exeption from trycompile()Jo-Philipp Wich
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-10-27luci-base: add ui indicator when fallback theme is usedJo-Philipp Wich
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-25treewide: separate Lua runtime resourcesJo-Philipp Wich
Move classes required for Lua runtime support into a new `luci-lua-runtime` package. Also replace the `luci.http` and `luci.util` classes in `luci-lib-base` with stubbed versions interacting with the ucode based runtime environment. Finally merge `luci-base-ucode` into the remainders of `luci-base`. Signed-off-by: Jo-Philipp Wich <jo@mein.io>