When I press the gui REBOOT button, it seems to call this JS
function reboot(button) {
(new XHR()).post('/cgi-bin/luci/admin/system/reboot/call', { token: 'xyzz' }, check);
}
Similarly doing a gui reset to defaults calls /cgi-bin/luci/admin/system/flashops/reset
On the filesystem I find the single file /www/cgi-bin/luci which seems to somehow dispatch generically.
Where are these functions on the router? Is the a good writeup on how luci gui actions translate into cgi code running on the router? Or maybe a tutorial somewhere?
I actually wanted to understand the linkage between luci buttons (and other gui elements) and the code which is run for them. At this point it is just learning, and trying to understand some behaviour I see.
At some point learning about the details involves actually looking into the details - the good news, the source is open, for everyone to see and change.