Skip to content

Latest commit

 

History

History
76 lines (50 loc) · 1.84 KB

install.md

File metadata and controls

76 lines (50 loc) · 1.84 KB

Installing Status Panel plugin

Requirements

Install dependencies

yarn install

Build plugin

  • 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.

Debug on Grafana

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.

Tests

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

Troubleshooting

Container not starting with error '/entrypoint' no such file or directory

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