fixed minor error graph gauge
This commit is contained in:
parent
80a7266fa5
commit
958b284ced
|
@ -881,10 +881,10 @@ 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 !== false) {
|
||||
if ( min_warning >= 0 ) {
|
||||
if ( min_warning >= 0 && ( min_warning != max_warning ) ) {
|
||||
config.yellowZones = [{ from: min_warning, to: max_warning }];
|
||||
}
|
||||
if ( min_critical >= 0 ) {
|
||||
if ( min_critical >= 0 && ( min_critical != max_critical ) ) {
|
||||
config.redZones = [{ from: min_critical, to: max_critical }];
|
||||
}
|
||||
}
|
||||
|
@ -959,12 +959,12 @@ function createGauges(data, width, height, font_size, no_data_image, font) {
|
|||
mininum = 0;
|
||||
if (mininum == maxinum)
|
||||
mininum = 0;
|
||||
|
||||
/*
|
||||
if (maximun_critical == 0 )
|
||||
maximun_critical = maxinum;
|
||||
if (maximun_warning == 0 )
|
||||
maximun_warning = minimun_critical;
|
||||
|
||||
*/
|
||||
if ( maxinum <= minimun_warning ) {
|
||||
minimun_warning = 0;
|
||||
maximun_warning = 0;
|
||||
|
|
Loading…
Reference in New Issue