https://github.com/grafana/grafana-treemap-panel
A panel plugin for Grafana to visualize treemaps.
https://github.com/grafana/grafana-treemap-panel
grafana grafana-plugin treemap
Last synced: 27 days ago
JSON representation
A panel plugin for Grafana to visualize treemaps.
- Host: GitHub
- URL: https://github.com/grafana/grafana-treemap-panel
- Owner: grafana
- License: apache-2.0
- Created: 2020-06-16T12:12:20.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-20T09:18:15.000Z (over 1 year ago)
- Last Synced: 2025-01-29T11:51:19.614Z (10 months ago)
- Topics: grafana, grafana-plugin, treemap
- Language: TypeScript
- Homepage:
- Size: 3.22 MB
- Stars: 41
- Watchers: 10
- Forks: 11
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Treemap for Grafana
[](https://github.com/grafana/grafana-treemap-panel/actions/workflows/push.yml)
[](https://github.com/grafana/grafana-treemap-panel/actions/workflows/publish.yml)
[](LICENSE)
More details about this plugin are available in the [README.md](./src/README.md) file, that gets published [here](https://grafana.com/grafana/plugins/marcusolsson-treemap-panel/?tab=overview).
## Development
### Frontend
> [!IMPORTANT]
> Prerequisites
>
> - [Yarn](https://yarnpkg.com)
> - [Docker](https://www.docker.com)
1. Install dependencies
```bash
yarn install
```
2. Build plugin in development mode and run in watch mode
```bash
yarn dev
```
3. Build plugin in production mode
```bash
yarn build
```
4. Run the tests (using Jest)
```bash
# Runs the tests and watches for changes, requires git init first
yarn test
# Exits after running all the tests, generates a coverage report
yarn test:ci
```
5. Spin up a Grafana instance and run the plugin inside it (using Docker)
```bash
yarn server
```
6. Run the E2E tests (using Playwright)
```bash
# Runs in a Docker container for consistency, generates a coverage report
yarn e2e
```
SEE: [./e2e/README.md]()
7. Update the E2E screenshots (using Playwright)
```bash
yarn e2e:update-screenshots
```
SEE: [./e2e/README.md]()
8. Run the linter
```bash
yarn lint
# or
yarn lint:fix
```
# Using Github actions "publish" workflow
## Publish ([Plugins - CD](https://github.com/grafana/grafana-treemap-panel/actions/workflows/publish.yml))
1. Update the version
- e.g, run `yarn version `
1. Update the [CHANGELOG](./CHANGELOG.md)
1. Commit and push changes, merge to `main`
1. Release and test plugin for `dev` environments:
- Go to [Plugins - CD](https://github.com/grafana/grafana-treemap-panel/actions/workflows/publish.yml) and "Run workflow"
- Leave "use workflow from" as `main`
- Choose `dev` as the environment to publish to
- Choose `main` as the branch to publish from
- It is possible to choose a PR for an earlier test on `dev`
- Manually test Evaluate the plugin from a dev environment
1. Release and plugin for `prod` environments:
- Go to [Plugins - CD](https://github.com/grafana/grafana-treemap-panel/actions/workflows/publish.yml) and "Run workflow"
- Leave "use workflow from" as `main`
- Choose `prod` as the environment to publish to
- Choose `main` as the branch to publish from