Some existing LuCI apps ship menu.d JSON files with `cbi` and `form` typed
dispatch targets, support those as well.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
}));
break;
+ case 'cbi':
+ http.write(render(() => {
+ runtime.call('luci.dispatcher', 'invoke_cbi_action',
+ action.path, null,
+ ...resolved.ctx.request_args
+ );
+ }));
+ break;
+
+ case 'form':
+ http.write(render(() => {
+ runtime.call('luci.dispatcher', 'invoke_form_action',
+ action.path,
+ ...resolved.ctx.request_args
+ );
+ }));
+ break;
+
case 'alias':
dispatch(http, [ ...split(action.path, '/'), ...resolved.ctx.request_args ]);
break;