- Nodejs >= 20.0.0
- Yarn
- Docker for debug with a Grafana container
yarn install
- Development
webpack -w -c ./.config/webpack/webpack.config.ts --env development
- Production
webpack -c ./.config/webpack/webpack.config.ts --env production
Commands can find in
package.json
file
That creates a /dist
folder with the plugin files compiled.
With the docker-compose.yml
file, you can run a Grafana container with a custom Grafana image which contains debug
tools.
The compose file, add to the /var/lib/grafana/plugins
folder the plugin files from /dist
.
docker-compose build
docker-compose up
You can adjust the docker-compose.yml
file to your needs (image tag version, env var...).
Attention: don't touch files in the
.config
folder, they are generate and used to create the custom Grafana image. See more
Auto reload are enabled. Juste save your changes and the plugin will be reloaded in the Grafana without restarting the container.
To run tests, make sure you have Docker container is up and installed playwright endToEnd test framework.
yarn install playwright --with-deps
Run test with the following command:
yarn playwright test
This error appears when you execute docker compose up
in Windows. To fix it, you need to change the line endings
of the entrypoint.sh
file from CRLF to LF.
You can use the dos2unix
command to do that.
dos2unix .config/entrypoint.sh