Hi,
I want to add a simple link to the menu. I'm not a developer and all the tutorials i found were pretty hard for me to understand. In fact, I want to add a link to the sarg-reports and maybe some quicklinks to the service logs.
Best
Marc
Hi Marc,
Look no further ;)
https://docs.opnsense.org/development/examples/helloworld.html#plugin-to-the-menu-system
Cheers,
Franco
Thanks for your reply. It seems to be very complicated to add an entry to the menu. I need a second opnsence instance for development just to place one litte file? hmmm :-/
Well, in practice you only need to create a single file on your running OPNsense to add an entry (or overwrite another).
You can also edit an existing menu file, but that will be overwritten on the next update.
Cheers,
Franco
Okay, i managed to create a custom Link section onto the menu. :)
is it possible to trigger a rebuild of the menu after changing the menu.xml file?
SOLVED: /usr/local/etc/rc.configure_plugins
For everyone looking to add some custom links and don't want so become a developer:
Quick and DIRTY!!
mkdir -p /usr/local/opnsense/mvc/app/models/OPNsense/Links/Menu
vi /usr/local/opnsense/mvc/app/models/OPNsense/Links/Menu/Menu.xml
<menu>
<Lobby>
<Links VisibleName="Links" cssClass="fa fa-tags fa-fw">
<Sarg url="/squid-reports/" />
<IDS-Alerts url="/ui/ids#alerts" />
<FW-LiveLog url="/ui/diagnostics/firewall/log" />
<Check_MK isExternal="Y" url="https://cmk.xxxxx" />
<Kibana isExternal="Y" url="https://logs.xxxxx" />
</Links>
</Lobby>
</menu>
run /usr/local/etc/rc.configure_plugins to regenerate menu