fix: cleanup dist folder, change README

- move images for README into docs/img
- move libs/* into utils. libs folder is copied into dist by grafana-toolkit
- remove d3-scale-chromatic sources, use it from dependencies
- update compatible versions in README
- update installation info
This commit is contained in:
Ivan Mikheykin
2021-02-16 17:43:48 +03:00
parent cf28c74069
commit b25f376f4e
126 changed files with 109 additions and 1046 deletions
+35 -28
View File
@@ -1,14 +1,14 @@
<p align="center">
<a href="https://github.com/flant/grafana-statusmap/releases/latest"><img src="https://img.shields.io/github/tag-date/flant/grafana-statusmap.svg?logo=github&label=latest" alt="Download from GitHub"/></a>
<a href="https://github.com/flant/grafana-statusmap/discussions"><img src="https://img.shields.io/badge/GitHub-discussions-brightgreen" alt="GH Discussions"/></a>
<a href="https://t.me/statusmap_ru"><img src="https://img.shields.io/badge/@statusmap_ru-RU-informational.svg?logo=telegram" alt="Telegram chat RU"/></a>
</p>
# Statusmap panel for Grafana
![Statusmap sample panel](https://raw.githubusercontent.com/flant/grafana-statusmap/master/src/img/flant-statusmap-panel.png)
[![Download from GitHub](https://img.shields.io/github/tag-date/flant/grafana-statusmap.svg?logo=github&label=latest)](https://github.com/flant/grafana-statusmap/releases/latest)
[![GH Discussions](https://img.shields.io/badge/GitHub-discussions-brightgreen)](https://github.com/flant/grafana-statusmap/discussions)
[![Telegram chat RU](https://img.shields.io/badge/@statusmap_ru-RU-informational.svg?logo=telegram)](https://t.me/statusmap_ru)
![Statusmap sample panel with dark theme](https://raw.githubusercontent.com/flant/grafana-statusmap/master/src/img/flant-statusmap-panel-dark.png)
Panel to show discrete statuses of multiple targets over time.
![Statusmap sample panel](https://raw.githubusercontent.com/flant/grafana-statusmap/master/docs/img/flant-statusmap-panel.png)
![Statusmap sample panel with dark theme](https://raw.githubusercontent.com/flant/grafana-statusmap/master/docs/img/flant-statusmap-panel-dark.png)
## Features
@@ -27,21 +27,28 @@
- Prometheus
- InfluxDB
- Mysql
* Tested with Grafana:
- 7.0, 7.1, 7.2, 7.3
- 6.6, 6.7
* Supported Grafana versions:
- 6.7+ are the most priority (6.7, 7.0-7.4)
- also works in 5.4.3 and 6.0+
## Installation
Plugin can be installed with GF_INSTALL_PLUGINS="flant-statusmap-panel" or you can use Git and clone this repo:
The preferred way of installation is Grafana configuration, e.g. with environment variable GF_INSTALL_PLUGINS="flant-statusmap-panel".
Also, you can download a released .zip file from [Releases](https://github.com/flant/grafana-statusmap/releases) page and uncompress it into Grafana's plugin directory (/var/lib/grafana/plugins/flant-statusmap-panel).
```
curl -sLO
unzip flant-statusmap-panel-v0.4.0.zip -d /var/lib/grafana/plugins/flant-statusmap-panel
```
For 5.x and 6.x versions of Grafana you can clone this repo:
```
git clone git@github.com:flant/grafana-statusmap.git /var/lib/grafana/plugins/flant-statusmap-panel
```
Alternatively, you can download [ZIP archive](https://github.com/flant/grafana-statusmap/archive/master.zip)
of this repo and unpack it into /var/lib/grafana/plugins directory.
## Motivation
@@ -134,17 +141,17 @@ ORDER BY $__timeGroup(date_insert,$__interval)
First of all, an individual query for each possible status' value should be created.
Each query should also have similar legend for grouping:
![Query setup](https://raw.githubusercontent.com/flant/grafana-statusmap/master/src/img/queries-example.png)
![Query setup](https://raw.githubusercontent.com/flant/grafana-statusmap/master/docs/img/queries-example.png)
Then, color mapping for status' values should be defined in __Discrete__ color mode:
![Color mapping](https://raw.githubusercontent.com/flant/grafana-statusmap/master/src/img/color-mapping.png)
![Color mapping](https://raw.githubusercontent.com/flant/grafana-statusmap/master/docs/img/color-mapping.png)
Use can use presets to define a trafic light colors or 8 colors from [solarized](https://ethanschoonover.com/solarized/) palette:
![Color mapping empty](https://raw.githubusercontent.com/flant/grafana-statusmap/master/src/img/color-preset-01.png)
![Color mapping empty](https://raw.githubusercontent.com/flant/grafana-statusmap/master/docs/img/color-preset-01.png)
![Color mapping trafic lights](https://raw.githubusercontent.com/flant/grafana-statusmap/master/src/img/color-preset-02.png)
![Color mapping trafic lights](https://raw.githubusercontent.com/flant/grafana-statusmap/master/docs/img/color-preset-02.png)
_Note: __Spectrum__ and __Opacity__ color modes function the same way they do in [Heatmap](https://grafana.com/plugins/heatmap) plugin._
@@ -154,30 +161,30 @@ _Note: __Spectrum__ and __Opacity__ color modes function the same way they do in
#### Bucket
![Bucket options](https://raw.githubusercontent.com/flant/grafana-statusmap/master/src/img/options-bucket.png)
![Bucket options](https://raw.githubusercontent.com/flant/grafana-statusmap/master/docs/img/options-bucket.png)
__Multiple values__ checkbox specifies how they should be displayed:
* If it's off, multiple values for one bucket are treated as error;
* If it's on, color for such bucket would be determined by the value having least index in color mapping.
![Color mapping](https://raw.githubusercontent.com/flant/grafana-statusmap/master/src/img/multiple-values-error.png)
![Color mapping](https://raw.githubusercontent.com/flant/grafana-statusmap/master/docs/img/multiple-values-error.png)
__Display nulls__ can be treated as empty buckets or displayed with the color of `0` value.
![Color mapping](https://raw.githubusercontent.com/flant/grafana-statusmap/master/src/img/null-as-empty.png)
![Color mapping](https://raw.githubusercontent.com/flant/grafana-statusmap/master/docs/img/null-as-empty.png)
__Min width__ and __spacing__ are used to specify minimal bucket width and spacing between buckets.
__Rounding__ may be used to round edges.
![Min width, spacing, rounding 1](https://raw.githubusercontent.com/flant/grafana-statusmap/master/src/img/min-width-spacing-rounding-01.png)
![Min width, spacing, rounding 1](https://raw.githubusercontent.com/flant/grafana-statusmap/master/docs/img/min-width-spacing-rounding-01.png)
![Min width, spacing, rounding 2](https://raw.githubusercontent.com/flant/grafana-statusmap/master/src/img/min-width-spacing-rounding-02.png)
![Min width, spacing, rounding 2](https://raw.githubusercontent.com/flant/grafana-statusmap/master/docs/img/min-width-spacing-rounding-02.png)
__Values index__ set to positive number to display only values from specified timeseries.
#### Display
![Display options](https://raw.githubusercontent.com/flant/grafana-statusmap/master/src/img/options-display.png)
![Display options](https://raw.githubusercontent.com/flant/grafana-statusmap/master/docs/img/options-display.png)
__Show legend__ checkbox toggles legend at the bottom of the panel.
@@ -185,7 +192,7 @@ __Rows sort__ can be used to sort labels on Y axis. Metrics — sort y labels a
#### Pagination
![Pagination controls](https://raw.githubusercontent.com/flant/grafana-statusmap/master/src/img/pagination-graph.png)
![Pagination controls](https://raw.githubusercontent.com/flant/grafana-statusmap/master/docs/img/pagination-graph.png)
__Enable pagination__ toggles pagination controls on graph.
@@ -193,7 +200,7 @@ __Rows per page__ a number of rows to display on graph.
#### Tooltip
![Tooltip in frozen state](https://raw.githubusercontent.com/flant/grafana-statusmap/master/src/img/tooltip-frozen.png)
![Tooltip in frozen state](https://raw.githubusercontent.com/flant/grafana-statusmap/master/docs/img/tooltip-frozen.png)
__Show tooltip__ toggles tooltip display on mouse over buckets.
@@ -205,7 +212,7 @@ __Items__ is a list of definitions to display URLs in tooltip.
Each URL has a template, icon, label and formating options: lowercase and date format for variables.
![Tooltip items editor](https://raw.githubusercontent.com/flant/grafana-statusmap/master/src/img/tooltip-editor.png)
![Tooltip items editor](https://raw.githubusercontent.com/flant/grafana-statusmap/master/docs/img/tooltip-editor.png)
## Development