Is there a template or updated Wiki for creating luCI applications?
The Wiki entries I've seen reference the legacy way, rather than using the JSON format for the Menu entries (for example).
I'm not looking to maintain compatibility with 19.xx or earlier, so mixing the two (like AdBlock does) isn't something that I need to worry about.
I just need an outline of what goes where and in what format
Appreciate the assistance!
git clone https://github.com/openwrt/luci
find applications/ | grep '.json$' | cut -d'/' -f2 | sort | uniq
So.. That would be a no to the template question?
I've looked at the luci repo, but unless you actually KNOW what the software is supposed to do, it makes it difficult to unwind it with any ease. I was looking at the WG package and Adblock, for example (which is why I know Adblock seems to support both the old and new formats)
I'll go digging again and see what I can find.. Worse case, I'll see if I can't create a template shell app for the future.
adblock is a pure JS implementation. For 19.07.x backward compatibility it delivers only an additional stub lua controller file (https://github.com/openwrt/luci/blob/master/applications/luci-app-adblock/luasrc/controller/adblock.lua) - that's all. If you don't need this for your project, just left it out.
Yeah, I was looking at using the
.htm format rather than JS to hopefully simplify things at the start. Thanks for the info @dibdot
I doubt that - if you're going to LuCI you have to learn/adapt the client side API for your needs, e.g. bookmark http://openwrt.github.io/luci/jsapi/index.html as reference and start with a stripped down example that @anon50098793 already mentioned.
Right, I was referring to using the UBI syntax (I guess) in the .htm rather than a .js?
With the change to format, I'm just having issues tracking everything down, but I'll find it eventually
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.