YunWebUI and LuCI

Hi,

I'd like to modify and add some function to the Arduino Yun's WebUI.

I've read some guides from Openwrt LuCI.

I can access any lua files in an TPLink Openwrt router,
/usr/lib/lua/luci/controller/admin#

However, when accessing the Yun: /usr/lib/lua/luci/controller/arduino/index.lua, I found that the lua codes is not in text.

Maybe they have been compiled.

Then, I found out this project in github, GitHub - arduino/YunWebUI: Arduino/Genuino Yún or Yún Shield Web panel

but not sure how to link it with the link http://x.x.x.x/cgi-bin/luci/webpanel/homepage

So, I'd like to ask for help,

  1. How can I make the lua files in the Yun readable? Do I need to compile the kernel myself?
  2. The files shown on http://10.1.1.202/cgi-bin/luci/webpanel/homepage is basically the files at /usr/lib/lua/luci/view/arduino,
    how the "webpanel" in the url redirect to "arduino" in the luci view directory? (The index.lua in the controller is not readable)

Many thanks for help!

LuCI is based on MVC (Model–view–controller). The '/usr/lib/lua/luci/controller/arduino/index.lua' is the controller file and byte compile.

Linino/Openwrt/LuCI are all open source, and you could easily replace it with source file.

opkg update
opkg  install wget
cd /usr/lib/lua/luci/controller/arduino/
mv  index.lua index.lua.bk
wget https://raw.githubusercontent.com/arduino/YunWebUI/master/usr/lib/lua/luci/controller/arduino/index.lua --no-check-certificate
/etc/init.d/uhttpd  restart