Development
Development setup
This data source plugin consists of both frontend and backend components.
Front-end Development
LTS version of Node.js is recommended. If you’re new to the Node.js ecosystem, Node Version Manager is a good place to start for managing different Node.js installations and environments.
Grafana’s plugin tools is used to develop the plugin. Please refer the documentation for more information.
Begin by installing Yarn (https://yarnpkg.com/)
npm install -g yarn
Install dependencies
yarn installBuild plugin in development mode or run in watch mode
yarn devor
yarn watchBuild plugin in production mode
yarn build
Back-end Development
If the Mage build tool is not already installed, you may install it using the installation instructions on the Mage homepage
Update Grafana plugin SDK for Go dependency to the latest minor version:
go get -u github.com/grafana/grafana-plugin-sdk-go
Build backend plugin binaries for Linux, Windows and Darwin:
mage -vList all available Mage targets for additional commands:
mage -l
Build documentation
This documentation is build by Sphinx. Follow below steps to build documentation.
python -m venv env
source env/bin/activate
pip install sphinx myst-parser sphinx_rtd_theme
cd docs
make html
Development Environment
Development Containers is available for development. You can launch a development container directly from Visual Studio Code.
The repository also includes a docker-compose.yaml file for the test environment.
The compose file defines the following four containers:
grafanamariadbarchapplioc
The ioc container automatically runs softIoc.
The Archiver Appliance also starts automatically in the archappl container.
However, no PVs are registered by default. You need to register PVs manually for archiving.
The Grafana server runs in the grafana container.
To retrieve data from archappl, you need to add a new data source using this plugin.
Use the following URL to access data from archappl:
http://archappl:8080/retrieval