Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
Data Grids in OPNSense - Where is data stored ?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Data Grids in OPNSense - Where is data stored ? (Read 4095 times)
darsen
Newbie
Posts: 7
Karma: 1
Data Grids in OPNSense - Where is data stored ?
«
on:
June 07, 2021, 08:53:03 am »
Hi Everyone,
I am developing a service plugin and I would like to integrate a Grid form in it.
I am using the following documentation page as a reference (Using grids module & plugin):
https://docs.opnsense.org/development/examples/using_grids.html
Everything is clear, but I don't understand two things.
# First Question
Where are the settings saved ? - When calling the API /api/gridexample/settings/searchItem from where are the items fetched ?
I was expecting a ".conf" ini file somewhere in the filesystem containing all the data but I cannot see it anywhere.
# Second Question
How do I retrieve the settings data from my backend application (eg python script) ?
Thanks a lot for clarification!
Aleksandar
Logged
franco
Administrator
Hero Member
Posts: 17668
Karma: 1611
Re: Data Grids in OPNSense - Where is data stored ?
«
Reply #1 on:
June 07, 2021, 10:11:14 am »
Settings are stored in /conf/config.xml naturally.
Backend data is read/created via
https://docs.opnsense.org/development/backend/configd.html
and can be read via:
$stats = trim((new Backend())->configdRun('compinentname dataprovider'));
Cheers,
Franco
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
Data Grids in OPNSense - Where is data stored ?