Thank you for your interest in contributing to the plugin! 🙏 This document explains the ways you can contribute the project!
- How do I ...
If you get stuck along the way, feel free to ask for help.
To contribute code:
- Check if there's an already existing issue that describes the reason or motivation behind your pull request.
- If there are no issues describing what you want to do, go ahead and create one. By creating an issue before you start working on a fix, you can increase the chance of your pull request getting accepted! 💪
- Include any documentation that your changes might need.
- Write or update tests to verify that your changes work as expected.
- Now you're ready to open a pull request!
- In the description for your pull request, add a line that says
Fixes #123
, where123
is the number of the issue the pull request fixes.
After you've created the pull request:
- If the maintainer asks for any changes, edit your changes, push, and ask for another review.
- If the maintainer decides to pass on your pull request, they will thank you for the contribution and explain why they won't be accepting the changes.
- If your pull request gets accepted, it'll be merged into the main branch soon after. Your contribution will be available in the next release! 🎉
This plugin uses Docusaurus to build the documentation.
For more information about writing documentation using Docusaurus, refer to the Docusaurus documentation.
The individual documentation pages are written in Markdown. You can find them under website/docs.
To preview the documentation site on your local machine, run the following in your terminal:
cd website/docs
yarn start
This project uses GitHub Pull Requests to manage contributions. If this is your first time contributing to a project on GitHub, you should first learn how to fork a project and make a pull request.
To build and run the plugin locally, you first need to:
Then enter the following in your terminal:
cd path/to/your/clone
yarn install
yarn build
If the commands ran successfully without errors, then you're ready to go! 🚀
Note: Instead of
yarn build
you can also runyarn watch
, which rebuilds the plugin whenever the source code changes.
Grafana loads plugins from any directory under the Grafana plugin directory.
By default, Grafana doesn't load unsigned plugins. To load the development build of the plugin, you need to configure Grafana to allow it by adding the following to your Grafana configuration file:
[plugins]
allow_loading_unsigned_plugins = marcusolsson-json-datasource
You can also configure this using environment variables:
export GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=marcusolsson-json-datasource
If you're running Grafana locally, then you can either move or symlink the project directory to the Grafana plugin directory.
# Linux and macOS
ln -s /path/to/your/clone /var/lib/grafana/plugins
If you have Docker installed, then you can instead mount the plugin into the container:
docker run --rm \
-v /path/to/your/clone:/var/lib/grafana/plugins \
-e GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=marcusolsson-json-datasource \
-p 3000:3000 \
grafana/grafana:latest