mirror of
https://github.com/timberjoegithub/grafana-statusmap.git
synced 2026-07-22 07:49:47 +00:00
Merge pull request #37 from flant/fix_color_null_error
Fix for null error on undefined values
This commit is contained in:
Vendored
+6
-1
@@ -107,7 +107,12 @@ System.register(["lodash"], function (_export, _context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (values.length == 1) {
|
if (values.length == 1) {
|
||||||
return this.getMatchedThreshold(values[0]).color;
|
var threshold = this.getMatchedThreshold(values[0]);
|
||||||
|
if (!threshold || !threshold.color || threshold.color == "") {
|
||||||
|
return 'rgba(0,0,0,1)';
|
||||||
|
} else {
|
||||||
|
return threshold.color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var isAllValuesNulls = true;
|
var isAllValuesNulls = true;
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -67,7 +67,12 @@ export class ColorModeDiscrete {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (values.length == 1) {
|
if (values.length == 1) {
|
||||||
return this.getMatchedThreshold(values[0]).color;
|
let threshold = this.getMatchedThreshold(values[0]);
|
||||||
|
if (!threshold || !threshold.color || threshold.color == "") {
|
||||||
|
return 'rgba(0,0,0,1)';
|
||||||
|
} else {
|
||||||
|
return threshold.color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let isAllValuesNulls = true;
|
let isAllValuesNulls = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user