Fixed problems with draw min warning and critical state of gauges. Tiquet: #3058

(cherry picked from commit 9b63444561)
This commit is contained in:
m-lopez-f 2015-12-18 11:17:21 +01:00
parent 2a0fe6005b
commit da3de006df
1 changed files with 7 additions and 7 deletions

View File

@ -880,14 +880,14 @@ function createGauge(name, etiqueta, value, min, max, min_warning,max_warning,mi
//var range = config.max - config.min;
var range = config.max - config.min;
if (value >= min_warning){
if ( min_warning > 0 ) {
config.yellowZones = [{ from: min_warning, to: max_warning }];
}
if ( min_critical > 0 ) {
config.redZones = [{ from: min_critical, to: max_critical }];
}
if ( min_warning > 0 ) {
config.yellowZones = [{ from: min_warning, to: max_warning }];
}
if ( min_critical > 0 ) {
config.redZones = [{ from: min_critical, to: max_critical }];
}
gauges = new Gauge(name, config);
gauges.render();
gauges.redraw(value);