summaryrefslogtreecommitdiff
path: root/modules/luci-base/ucode/runtime.uc
Commit message (Collapse)AuthorAgeFilesLines
* luci-base: runtime.uc: fix error500() invocation on theme failureJo-Philipp Wich2023-08-071-1/+1
| | | | | | | | 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>
* luci-base: only render theme specific sysauth template when it existsJo-Philipp Wich2022-11-251-0/+6
| | | | | | | | 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>
* luci-base: fix rendering ucode templates from `template` targetJo-Philipp Wich2022-11-221-0/+4
| | | | | | | | | 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>
* luci-base: fix luci.http.close()Jo-Philipp Wich2022-11-031-2/+8
| | | | | | | | | 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>
* luci-base: runtime.uc: avoid Lua not installed exeption from trycompile()Jo-Philipp Wich2022-11-021-8/+14
| | | | | | | | | 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>
* luci-base: add ui indicator when fallback theme is usedJo-Philipp Wich2022-10-271-0/+1
| | | | | | | 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>
* treewide: separate Lua runtime resourcesJo-Philipp Wich2022-10-251-0/+162
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>