mirror of
https://github.com/openwrt/luci.git
synced 2025-12-27 01:09:37 +04:00
db91dbcdf7db16b307aaf054a6039a6abc464b0c
follow-up to a2fce95248
hasSystemFeature() inspects the cached result of
probeSystemFeatures() which needs to have completed.
Once all of the legacy (Lua) stuff is ready, this block
runs:
initDOM() {
...
L.loaded = true;
document.dispatchEvent(new CustomEvent('luci-loaded'));
},
This commit now calls View.load() once system feature
probing has completed, and LuCI itself has loaded. This
ensures that the following load paradigm succeeds:
return view.extend({
load() {
return Promise.all([
...,
L.hasSystemFeature('x'),
]);
}, ...
The luci-loaded check prevents waiting when LuCI is already
loaded (the common case after initial page load), but the
listener handles the race condition where a View is
instantiated before initDOM() completes.
The flow:
If L.loaded is true: initDOM() already ran --> skip waiting,
proceed immediately.
If L.loaded is false: initDOM() hasn't run yet --> add
listener --> wait for it to complete.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
OpenWrt luci feed
Description
This is the OpenWrt "luci"-feed containing LuCI - OpenWrt Configuration Interface.
Usage
This feed is enabled by default. Your feeds.conf.default (or feeds.conf) should contain a line like:
src-git luci https://github.com/openwrt/luci.git
To install all its package definitions, run:
./scripts/feeds update luci
./scripts/feeds install -a -p luci
API Reference
You can browse the generated API documentation directly on Github.
- Server side Lua APIs; Note: deprecated - Lua will be removed in future. Use ucode rpcd for server side operations.
- Client side JavaScript APIs
Development
Documentation for developing and extending LuCI can be found in the Wiki
License
See LICENSE file.
Package Guidelines
See CONTRIBUTING.md file.
Translation status
Use Weblate instead of direct editing of the *.po files.
Description
Languages
JavaScript
59.2%
C
18.4%
Lua
11.2%
CSS
3.8%
HTML
2.3%
Other
5%