luCI app template?

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 :slight_smile:

Appreciate the assistance!

git clone https://github.com/openwrt/luci
cd luci
find applications/ | grep '.json$' | cut -d'/' -f2 | sort | uniq
luci-app-acl
luci-app-acme
luci-app-adblock
luci-app-advanced-reboot
luci-app-ahcp
luci-app-aria2
luci-app-attendedsysupgrade
luci-app-babeld
luci-app-banip
luci-app-bcp38
luci-app-clamav
luci-app-commands
luci-app-coovachilli
luci-app-cshark
luci-app-dawn
luci-app-dcwapd
luci-app-ddns
luci-app-diag-core
luci-app-dnscrypt-proxy
luci-app-dockerman
luci-app-dump1090
luci-app-dynapoint
luci-app-eoip
luci-app-firewall
luci-app-frpc
luci-app-frps
luci-app-fwknopd
luci-app-hd-idle
luci-app-https-dns-proxy
luci-app-ksmbd
luci-app-ltqtapi
luci-app-lxc
luci-app-minidlna
luci-app-mjpg-streamer
luci-app-mosquitto
luci-app-mwan3
luci-app-nextdns
luci-app-nft-qos
luci-app-nlbwmon
luci-app-noddos
luci-app-ntpc
luci-app-nut
luci-app-ocserv
luci-app-olsr
luci-app-olsr-viz
luci-app-omcproxy
luci-app-openvpn
luci-app-opkg
luci-app-p910nd
luci-app-pagekitec
luci-app-polipo
luci-app-privoxy
luci-app-qos
luci-app-radicale
luci-app-radicale2
luci-app-rosy-file-server
luci-app-rp-pppoe-server
luci-app-samba4
luci-app-ser2net
luci-app-shadowsocks-libev
luci-app-shairplay
luci-app-siitwizard
luci-app-simple-adblock
luci-app-smartdns
luci-app-snmpd
luci-app-softether
luci-app-splash
luci-app-sqm
luci-app-squid
luci-app-statistics
luci-app-tinyproxy
luci-app-transmission
luci-app-travelmate
luci-app-ttyd
luci-app-udpxy
luci-app-uhttpd
luci-app-unbound
luci-app-upnp
luci-app-vnstat
luci-app-vnstat2
luci-app-vpnbypass
luci-app-vpn-policy-routing
luci-app-watchcat
luci-app-wifischedule
luci-app-wireguard
luci-app-wol
luci-app-xinetd
1 Like

So.. That would be a no to the template question? :stuck_out_tongue:

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.

Thanks @anon50098793!

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.

1 Like

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.

1 Like

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 :slight_smile:

For any future searchers:

I managed to find https://github.com/openwrt/luci/wiki/ModulesHowTo and https://github.com/openwrt/luci/wiki/Modules which is a great start.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.