diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index bbbc813ce0..a8a89e45c6 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3695,7 +3695,12 @@ function reporting_value($report, $content, $type) { case 'max': $value = reporting_get_agentmodule_data_max( $content['id_agent_module'], $content['period'], $report["datetime"]); - $formated_value = format_for_graph($value, 2) . " " . $unit; + if (!$config['simple_module_value']) { + $formated_value = $value; + } + else { + $formated_value = format_for_graph($value, $config['graph_precision']) . " " . $unit; + } break; case 'min': $value = reporting_get_agentmodule_data_min( @@ -3704,7 +3709,7 @@ function reporting_value($report, $content, $type) { $formated_value = $value; } else { - $formated_value = format_for_graph($value, 2) . " " . $unit; + $formated_value = format_for_graph($value, $config['graph_precision']) . " " . $unit; } break; case 'avg': @@ -3714,7 +3719,7 @@ function reporting_value($report, $content, $type) { $formated_value = $value; } else { - $formated_value = format_for_graph($value, 2) . " " . $unit; + $formated_value = format_for_graph($value, $config['graph_precision']) . " " . $unit; } break; case 'sum': @@ -3724,7 +3729,7 @@ function reporting_value($report, $content, $type) { $formated_value = $value; } else { - $formated_value = format_for_graph($value, 2) . " " . $unit; + $formated_value = format_for_graph($value, $config['graph_precision']) . " " . $unit; } break; case 'MTTR': diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index a32223abe7..fa73b91a16 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1576,7 +1576,7 @@ function visual_map_get_simple_value($type, $id_module, $period = SECONDS_1DAY) else { if ( is_numeric($value) ) { if ($config['simple_module_value']) { - $value = format_for_graph($value, 2); + $value = format_for_graph($value, $config['graph_precision']); } } if (!empty($unit_text)) @@ -1592,7 +1592,7 @@ function visual_map_get_simple_value($type, $id_module, $period = SECONDS_1DAY) else { if ( is_numeric($value) ) { if ($config['simple_module_value']) { - $value = format_for_graph($value, 2); + $value = format_for_graph($value, $config['graph_precision']); } } if (!empty($unit_text)) @@ -1608,7 +1608,7 @@ function visual_map_get_simple_value($type, $id_module, $period = SECONDS_1DAY) else { if ( is_numeric($value) ) { if ($config['simple_module_value']) { - $value = format_for_graph($value, 2); + $value = format_for_graph($value, $config['graph_precision']); } } if (!empty($unit_text))