| Both sides previous revision Previous revision Next revision | Previous revision |
| docs:techref:luci2 [2019/07/14 16:18] – Link changed from external to internal (internal ones are automatically adjusted when pages are moved, external ones are not) tmomas | docs:techref:luci2 [2021/03/18 12:48] (current) – Add warning, remove old luci2 feed hnyman |
|---|
| ====== LuCI2 (OpenWrt web user interface) ====== | ====== LuCI2 (OpenWrt web user interface) ====== |
| | {{page>meta:infobox:outdated&noheader&nofooter&noeditbtn}} |
| | |
| | ==== NOTE: This page currently mixes the five+ years old abandoned original "luci2" and the new JavaScript based standard LuCI implementation. Information on this page can be partially misleading==== |
| | |
| |
| For years OpenWrt was using [[LuCI]], a web user interface written in [[http://en.wikipedia.org/wiki/Lua_(programming_language)|Lua]]. It required several Lua extensions (like ''ubus'', ''luci.model.uci'', ''nixio.fs'', etc.) to access system info and settings. Unfortunately this solution appeared to be quite resource consuming and didn't work well on devices with slow CPU and little amount of RAM. | For years OpenWrt was using [[LuCI]], a web user interface written in [[http://en.wikipedia.org/wiki/Lua_(programming_language)|Lua]]. It required several Lua extensions (like ''ubus'', ''luci.model.uci'', ''nixio.fs'', etc.) to access system info and settings. Unfortunately this solution appeared to be quite resource consuming and didn't work well on devices with slow CPU and little amount of RAM. |
| |
| This lead to developing LuCI2, a new web interface with a different architecture. It doesn't use Lua anymore, but static HTML page and [[http://en.wikipedia.org/wiki/XMLHttpRequest|JavaScript XHR]] method. It means building HTML pages is done on client (browser) side offloading OpenWrt device. To access any kind of system data [[ubus]] is used (with the help of [[ubus#access_to_ubus_over_http|uhttpd-mod-ubus]] to provide HTTP based API). | This led to developing LuCI2, a new web interface with a different architecture. It doesn't use Lua anymore, but static HTML page and [[http://en.wikipedia.org/wiki/XMLHttpRequest|JavaScript XHR]] method. It means building HTML pages is done on client (browser) side offloading OpenWrt device. To access any kind of system data [[ubus]] is used (with the help of [[ubus#access_to_ubus_over_http|uhttpd-mod-ubus]] to provide HTTP based API). |
| |
| LuCI2 is still experimental. Its predecessor is still used by default in all builds, including the trunk. | LuCI2 is still experimental. Its predecessor is still used by default in all builds, including the trunk. |
| console.log(memory); | console.log(memory); |
| });</code> | });</code> |
| |
| ==== How to test ==== | |
| Code is being developed here [[https://github.com/jow-/luci-ng]] | |
| |
| FIXME: As of March 2019 - The 'feed' method described here no longer works. | |
| |
| Add new feed into [[docs:guide-developer:feeds|feeds.conf]] : | |
| <code> | |
| src-git luci2 https://github.com/jow-/luci-ng.git | |
| </code> | |
| |
| Install luci2 packages: | |
| <code>./scripts/feeds update | |
| ./scripts/feeds install luci2 | |
| </code> | |
| |
| Select package Luci2 in menuconfig and compile new image. | |
| |
| |