Merge branch '151-show_units_in_avg_max_min_reports' into 'pandora_6.0'
Fixed mac, avg and min values in reports and visual maps. Ticket #159 See merge request !91
This commit is contained in:
commit
50b4ddc589
|
@ -3717,7 +3717,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(
|
||||
|
@ -3726,7 +3731,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':
|
||||
|
@ -3736,7 +3741,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':
|
||||
|
@ -3746,7 +3751,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':
|
||||
|
|
|
@ -1183,7 +1183,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))
|
||||
|
@ -1199,7 +1199,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))
|
||||
|
@ -1215,7 +1215,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))
|
||||
|
|
Loading…
Reference in New Issue