The gui itself is rendered using JS in the browser. I am trying to understand how it gets configuration/status information from the router, and how it updates configuration on the router. I have looked for a simple overview description but have not found it.
A lot of the documentation is writen in terms of lua, e.g. https://github.com/openwrt/luci/wiki/ModulesHowTo which I understood to be the old way. Where is lua still used?
Does all the configuration updating happen through JSON rpc ?
Is there an self contained example of adding a new configuration file to /etc/config and then being able to edit it in luci?
For instance the dropbear configuration gui seems pretty straight forward. But is
'use strict';
'require view';
'require form';
'require tools.widgets as widgets';
return view.extend({
render: function() {
var m, s, o;
m = new form.Map('dropbear', _('SSH Access'), _('Dropbear offers <abbr title="Secure Shell">SSH</abbr> network shell access and an integrated <abbr title="Secure Copy">SCP</abbr> server'));
s = m.section(form.TypedSection, 'dropbear', _('Dropbear Instance'));
s.anonymous = true;
s.addremove = true;
s.addbtntitle = _('Add instance');
o = s.option(widgets.NetworkSelect, 'Interface', _('Interface'), _('Listen only on the given interface or, if unspecified, on all'));
o.nocreate = true;
o.unspecified = true;
This file has been truncated. show original
Is there corresponding dropbear router side code, or is it all handled in a generic rpc handler for form.Map?