OPNsense Forum

English Forums => Development and Code Review => Topic started by: pilotboy72 on July 26, 2019, 08:24:39 pm

Title: Widget Example
Post by: pilotboy72 on July 26, 2019, 08:24:39 pm
Hi,

I'm interested in developing some widgets to use on the Lobby page.  Are there any examples from which I can draw to get started?

Brian
Title: Re: Widget Example
Post by: fabian on July 27, 2019, 10:16:56 am
You can find the widgets here:

https://github.com/opnsense/core/tree/master/src/www/widgets

There are no tutorials but they are easy because you only need to create one file in include to register the widget and one in widgets (mind the naming) which contains the widget code.

The easiest way is to copy an existing one and adjust it for your needs.
Title: Re: Widget Example
Post by: pilotboy72 on July 27, 2019, 06:44:47 pm
Appreciate the pointers @fabian.