From 8263823e4523b845a891104ea0717be4987f1992 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez <arturo.gonzalez@artica.es> Date: Fri, 28 Oct 2016 13:42:33 +0200 Subject: [PATCH] Added data precision to some items in custom reports --- pandora_console/include/functions_reporting_html.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 4b1dddea95..c2586dce94 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -364,13 +364,13 @@ function reporting_html_SLA($table, $item, $mini) { } elseif ($sla['sla_status']) { $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NORMAL.';">' . - round($sla['sla_value'], 2) . "%" . '</span>'; + remove_right_zeros(number_format($sla['sla_value'], $config['graph_precision'])) . "%" . '</span>'; $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NORMAL.';">' . __('OK') . '</span>'; } else { $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_CRITICAL.';">' . - round($sla['sla_value'], 2) . "%" . '</span>'; + remove_right_zeros(number_format($sla['sla_value'], $config['graph_precision'])) . "%" . '</span>'; $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_CRITICAL.';">' . __('Fail') . '</span>'; } @@ -391,13 +391,13 @@ function reporting_html_SLA($table, $item, $mini) { } elseif ($sla['sla_status']) { $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NORMAL.';">' . - round($sla['sla_value'], 2) . "%" . '</span>'; + remove_right_zeros(number_format($sla['sla_value'], $config['graph_precision'])) . "%" . '</span>'; $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NORMAL.';">' . __('OK') . '</span>'; } else { $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_CRITICAL.';">' . - round($sla['sla_value'], 2) . "%" . '</span>'; + remove_right_zeros(number_format($sla['sla_value'], $config['graph_precision'])) . "%" . '</span>'; $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_CRITICAL.';">' . __('Fail') . '</span>'; }