24 Commits
Author SHA1 Message Date
Ivan MikheykinandGitHub bc96037286 Merge pull request #209 from flant/fix_null_as_zero
fix: null as zero
2021-07-19 21:17:17 +03:00
Ivan MikheykinandGitHub ba27b10638 Merge pull request #208 from flant/fix_branding_opacity
fix: change opacity for branding
2021-07-19 21:15:37 +03:00
Ivan MikheykinandGitHub c943700efb Merge pull request #207 from flant/dependabot/github_actions/actions/setup-node-2.2.0
build(deps): bump actions/setup-node from 2.1.5 to 2.2.0
2021-07-19 21:11:40 +03:00
Ivan MikheykinandGitHub 1a8a281d28 Merge pull request #204 from flant/dependabot/github_actions/actions/cache-2.1.6
build(deps): bump actions/cache from 2.1.5 to 2.1.6
2021-07-19 21:11:24 +03:00
Ivan Mikheykin 36042a6daf fix: change opacity for branding 2021-07-19 21:10:25 +03:00
Ivan Mikheykin 0b5ce0831e fix(render): null as zero for spectrum mode (continue #205) 2021-07-19 21:02:50 +03:00
Grigorii KhmelnitskiiandIvan Mikheykin c1a3b91082 fix spectrum as zero 2021-07-19 21:00:26 +03:00
dependabot[bot]andGitHub 3f8929f672 build(deps): bump actions/setup-node from 2.1.5 to 2.2.0
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.1.5 to 2.2.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.1.5...v2.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-01 00:17:59 +00:00
dependabot[bot]andGitHub 26cbec8efd build(deps): bump actions/cache from 2.1.5 to 2.1.6
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.5 to 2.1.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.5...v2.1.6)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-28 06:03:41 +00:00
Ivan Mikheykin 74dd7ca41e Merge remote-tracking branches 'origin/dependabot/github_actions/actions/checkout-2.3.4', 'origin/dependabot/github_actions/actions/create-release-1.1.4', 'origin/dependabot/github_actions/actions/upload-release-asset-1.0.2' and 'origin/dependabot/npm_and_yarn/lodash-4.17.21' 2021-05-24 21:39:33 +03:00
dependabot[bot]andGitHub d5bf7d6f54 build(deps): bump actions/checkout from 2 to 2.3.4
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.3.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v2.3.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 05:53:21 +00:00
dependabot[bot]andGitHub e63246c04c build(deps): bump actions/upload-release-asset from 1 to 1.0.2
Bumps [actions/upload-release-asset](https://github.com/actions/upload-release-asset) from 1 to 1.0.2.
- [Release notes](https://github.com/actions/upload-release-asset/releases)
- [Commits](https://github.com/actions/upload-release-asset/compare/v1...v1.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 05:53:19 +00:00
dependabot[bot]andGitHub a1710ef8f1 build(deps): bump actions/create-release from 1 to 1.1.4
Bumps [actions/create-release](https://github.com/actions/create-release) from 1 to 1.1.4.
- [Release notes](https://github.com/actions/create-release/releases)
- [Commits](https://github.com/actions/create-release/compare/v1...v1.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 05:53:16 +00:00
dependabot[bot]andGitHub f55406def3 build(deps-dev): bump lodash from 4.17.19 to 4.17.21
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-07 18:28:17 +00:00
Ivan MikheykinandGitHub a3983b8378 Merge pull request #195 from flant/dependabot/github_actions/actions/cache-v2.1.5
build(deps): bump actions/cache from v2.1.4 to v2.1.5
2021-04-16 22:29:25 +03:00
dependabot[bot]andGitHub e95cd6095a build(deps): bump actions/cache from v2.1.4 to v2.1.5
Bumps [actions/cache](https://github.com/actions/cache) from v2.1.4 to v2.1.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.4...1a9e2138d905efd099035b49d8b7a3888c653ca8)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-13 07:17:55 +00:00
Ivan MikheykinandGitHub 93b92b1570 Merge pull request #193 from flant/fix_readme_installation
fix: installation link is changed on grafana.com
2021-03-16 12:30:39 +03:00
Ivan Mikheykin e2c3766650 fix: installation link is changed on grafana.com 2021-03-16 12:22:59 +03:00
Ivan MikheykinandGitHub 6c887e5ba4 Merge pull request #189 from flant/dependabot/github_actions/actions/setup-node-v2.1.5
build(deps): bump actions/setup-node from v2.1.4 to v2.1.5
2021-02-23 23:49:42 +03:00
dependabot[bot]andGitHub 6d1fc9c012 build(deps): bump actions/setup-node from v2.1.4 to v2.1.5
Bumps [actions/setup-node](https://github.com/actions/setup-node) from v2.1.4 to v2.1.5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.1.4...46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-23 07:16:41 +00:00
Ivan MikheykinandGitHub f90015723a Merge pull request #186 from flant/prepare_v0_4_1
Prepare release 0.4.1
2021-02-18 12:20:43 +03:00
Ivan Mikheykin 15d9132cbe Prepare release 0.4.1 2021-02-18 12:19:30 +03:00
Ivan MikheykinandGitHub e9e36d7f39 Merge pull request #185 from flant/fix_discrete_mode_regression
fix: use == operator instead of strict equal
2021-02-18 12:16:57 +03:00
Ivan Mikheykin 6372ddf8df fix: use == operator instead of strict equal
- regression after fix linter issues. See a8e2a8fa.
2021-02-18 12:11:39 +03:00
11 changed files with 43 additions and 27 deletions
+4 -4
View File
@@ -12,10 +12,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2.3.4
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.4
uses: actions/setup-node@v2.2.0
with:
node-version: "14.x"
@@ -24,7 +24,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn cache
uses: actions/cache@v2.1.4
uses: actions/cache@v2.1.6
id: cache-yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -34,7 +34,7 @@ jobs:
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v2.1.4
uses: actions/cache@v2.1.6
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
+7 -7
View File
@@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2.3.4
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.4
uses: actions/setup-node@v2.2.0
with:
node-version: "14.x"
@@ -27,7 +27,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn cache
uses: actions/cache@v2.1.4
uses: actions/cache@v2.1.6
id: cache-yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -37,7 +37,7 @@ jobs:
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v2.1.4
uses: actions/cache@v2.1.6
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
@@ -110,7 +110,7 @@ jobs:
- name: Create release
id: create_release
uses: actions/create-release@v1
uses: actions/create-release@v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
@@ -121,7 +121,7 @@ jobs:
- name: Add plugin to release
id: upload-plugin-asset
uses: actions/upload-release-asset@v1
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
@@ -132,7 +132,7 @@ jobs:
- name: Add checksum to release
id: upload-checksum-asset
uses: actions/upload-release-asset@v1
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## v0.4.1
- Fix regression in discrete mode. "Data has value with undefined color"
## v0.4.0
- Add __y_label_trim variable for tooltip items.
+1 -1
View File
@@ -199,7 +199,7 @@ Each URL has a template, icon, label and formating options: lowercase and date f
* [Changelog](https://github.com/flant/grafana-statusmap/blob/master/CHANGELOG.md)
* Use [GitHub Discussions](https://github.com/flant/grafana-statusmap/discussions) to ask for help.
* [Installation](https://grafana.com/grafana/plugins/flant-statusmap-panel/installation)
* [Installation](https://grafana.com/grafana/plugins/flant-statusmap-panel/?tab=installation)
* Setup [development](https://github.com/flant/grafana-statusmap/blob/master/DEVELOPMENT.md) environment to help us improve the plugin.
## Acknowledgements
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "flant-statusmap-panel",
"version": "0.4.0",
"version": "0.4.1",
"description": "Grafana panel plugin to visualize status of multiple objects over time",
"main": "README.md",
"scripts": {
@@ -28,7 +28,7 @@
"@types/lodash": "4.14.123",
"d3": "4.13.0",
"emotion": "10.0.27",
"lodash": "4.17.19"
"lodash": "4.17.21"
},
"dependencies": {
"d3-scale-chromatic": "^2"
+13 -8
View File
@@ -32,7 +32,7 @@ export class ColorModeDiscrete {
for (let i = 0; i < thresholds.length; i++) {
for (let j = 0; j < values.length; j++) {
if (values[j] === thresholds[i].value) {
if (this.isEqualValues(values[j], thresholds[i].value)) {
tooltips.push({
tooltip: thresholds[i].tooltip ? thresholds[i].tooltip : values[j],
color: thresholds[i].color,
@@ -43,18 +43,16 @@ export class ColorModeDiscrete {
return tooltips;
}
convertValueToTooltips(values) {
convertValueToTooltips(value) {
let thresholds = this.panel.color.thresholds;
let tooltips = [];
for (let i = 0; i < thresholds.length; i++) {
//for (let j = 0; j < values.length; j++) {
if (values === thresholds[i].value) {
if (this.isEqualValues(value, thresholds[i].value)) {
tooltips.push({
tooltip: thresholds[i].tooltip ? thresholds[i].tooltip : values,
tooltip: thresholds[i].tooltip ? thresholds[i].tooltip : value,
color: thresholds[i].color,
});
//}
}
}
return tooltips;
@@ -135,7 +133,7 @@ export class ColorModeDiscrete {
for (let i = 0; i < thresholds.length; i++) {
for (let j = 0; j < values.length; j++) {
if (values[j] === thresholds[i].value) {
if (this.isEqualValues(values[j], thresholds[i].value)) {
return this.getDiscreteColor(i);
}
}
@@ -199,7 +197,7 @@ export class ColorModeDiscrete {
let thresholds = this.panel.color.thresholds;
for (let k = 0; k < thresholds.length; k++) {
if (value === thresholds[k].value) {
if (this.isEqualValues(value, thresholds[k].value)) {
return thresholds[k];
}
}
@@ -218,6 +216,13 @@ export class ColorModeDiscrete {
return thresholds[index];
}
isEqualValues(val1, val2) {
// Relaxed equal operator here is important.
// threshold.value can be a number or a string and input value can be a number or a string.
/* eslint-disable eqeqeq */
return val1 == val2;
}
roundIntervalCeil(interval) {
switch (true) {
case interval <= 10:
+4
View File
@@ -578,6 +578,10 @@ export class StatusmapRenderer {
if (this.panel.color.mode === 'opacity') {
return this.panel.color.cardColor;
} else if (this.panel.color.mode === 'spectrum') {
if (!bucket.value && this.panel.nullPointMode === 'as zero') {
// bucket.value === 0 falls here, but it is fine.
return this.colorScale(0);
}
return this.colorScale(bucket.value);
} else if (this.panel.color.mode === 'discrete') {
if (this.panel.seriesFilterIndex !== null && this.panel.seriesFilterIndex !== -1) {
+1 -1
View File
@@ -25,7 +25,7 @@
right: 0;
width: 20px;
height: 20px;
opacity: 0.15;
opacity: $branding-opacity;
:hover > & {
opacity: 1;
+2
View File
@@ -7,3 +7,5 @@ $warning-bg: #333333; // $dark-4
$theme-name: dark;
$white: #fff;
$red: #d44a3a;
$branding-opacity: 0.5;
+1
View File
@@ -8,3 +8,4 @@ $theme-name: light;
$white: #fff;
$red: #d44939;
$branding-opacity: 0.33;
+4 -4
View File
@@ -8206,10 +8206,10 @@ lodash@4.17.19:
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
lodash@^4.0.0, lodash@^4.0.1, lodash@^4.1.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@~4.17.10:
version "4.17.20"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
lodash@4.17.21, lodash@^4.0.0, lodash@^4.0.1, lodash@^4.1.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@~4.17.10:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
log-symbols@^3.0.0:
version "3.0.0"