mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Singlestat: small fix for threshold evalutations, use greater or equal for threshold checks, Fixes #1192
This commit is contained in:
@@ -173,8 +173,8 @@ function (angular, app, _, TimeSeries, kbn, PanelMeta) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var series = $scope.series[0];
|
var series = $scope.series[0];
|
||||||
data.mainValue = series.stats[$scope.panel.valueName];
|
data.mainValue = 0;
|
||||||
data.mainValueFormated = $scope.getFormatedValue(data.mainValue);
|
data.mainValueFormated = '0';
|
||||||
data.flotpairs = series.flotpairs;
|
data.flotpairs = series.flotpairs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ function (angular, app, _, $) {
|
|||||||
|
|
||||||
function getColorForValue(value) {
|
function getColorForValue(value) {
|
||||||
for (var i = data.thresholds.length - 1; i >= 0 ; i--) {
|
for (var i = data.thresholds.length - 1; i >= 0 ; i--) {
|
||||||
if (value > data.thresholds[i]) {
|
if (value >= data.thresholds[i]) {
|
||||||
return data.colorMap[i];
|
return data.colorMap[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user