Fixed problems with draw min warning and critical state of gauges. Tiquet: #3058
(cherry picked from commit 9b63444561
)
This commit is contained in:
parent
2a0fe6005b
commit
da3de006df
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue