Development
Development setup
This data source plugin consists of both frontend and backend components.
Front-end Development
Node version v12.x 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-toolkit is used to develop the plugin. Please refer grafana-toolkit documentation for more information.
Begin by installing Yarn (https://yarnpkg.com/)
npm install -g yarn
Install dependencies
yarn install
Build plugin in development mode or run in watch mode
yarn dev
or
yarn watch
Build 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 -v
List 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
make html