From f310ce49a9671695a819149751e480bbc4dbd44d Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Fri, 30 Dec 2022 10:21:43 +0100 Subject: [PATCH] 10075 Compatibility SLA report with php8 --- .../include/functions_reporting_html.php | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 77c6db2807..aef5c7eb0e 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -652,18 +652,18 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0) $row[] = round($sla['sla_limit'], 2).'%'; if (reporting_sla_is_not_init_from_array($sla)) { - $row[] = ''.__('N/A').''; - $row[] = ''.__('Not init').''; + $row[] = ''.__('N/A').''; + $row[] = ''.__('Not init').''; } else if (reporting_sla_is_ignored_from_array($sla)) { - $row[] = ''.__('N/A').''; - $row[] = ''.__('No data').''; + $row[] = ''.__('N/A').''; + $row[] = ''.__('No data').''; // Normal calculation. } else if ($sla['sla_status']) { - $row[] = ''.sla_truncate($sla['sla_value'], $config['graph_precision']).'%'; - $row[] = ''.__('OK').''; + $row[] = ''.sla_truncate($sla['sla_value'], $config['graph_precision']).'%'; + $row[] = ''.__('OK').''; } else { - $row[] = ''.sla_truncate($sla['sla_value'], $config['graph_precision']).'%'; - $row[] = ''.__('Fail').''; + $row[] = ''.sla_truncate($sla['sla_value'], $config['graph_precision']).'%'; + $row[] = ''.__('Fail').''; } // Second table for time globals. @@ -3463,10 +3463,10 @@ function reporting_html_monitor_report($table, $item, $mini, $pdf=0) $table1->head = []; $table1->data = []; if ($item['data']['unknown'] == 1) { - $table1->data['data']['unknown'] = '

'; + $table1->data['data']['unknown'] = '

'; $table1->data['data']['unknown'] .= __('Unknown').'

'; } else { - $table1->data['data']['ok'] = '

'; + $table1->data['data']['ok'] = '

'; $table1->data['data']['ok'] .= html_print_image( 'images/module_ok.png', true @@ -3479,7 +3479,7 @@ function reporting_html_monitor_report($table, $item, $mini, $pdf=0) ) ).' %

'; - $table1->data['data']['fail'] = '

'; + $table1->data['data']['fail'] = '

'; $table1->data['data']['fail'] .= html_print_image( 'images/module_critical.png', true @@ -4683,7 +4683,7 @@ function reporting_html_availability_graph($table, $item, $pdf=0) $checks_resume_text = ''; $checks_resume_text .= $checks_resume; $checks_resume_text .= ''; - $sla_value_text = "".$sla_value.''; + $sla_value_text = "".$sla_value.''; switch ($item['data'][$k_chart]['failover']) { case 'primary_compare': $title = ''.__('Primary').' (24x7)'; @@ -4711,7 +4711,7 @@ function reporting_html_availability_graph($table, $item, $pdf=0) case 'result_compare': $title = ''.__('Result').' (24x7)'; - $sla_value_text = "".$sla_value.''; + $sla_value_text = "".$sla_value.''; $checks_resume_text = ''; $checks_resume_text .= $checks_resume; $checks_resume_text .= ''; @@ -4722,7 +4722,7 @@ function reporting_html_availability_graph($table, $item, $pdf=0) $total_values += $sla_value; $count_total_charts++; $title = ''.__('Result').''; - $sla_value_text = "".$sla_value.''; + $sla_value_text = "".$sla_value.''; $checks_resume_text = ''; $checks_resume_text .= $checks_resume; $checks_resume_text .= ''; @@ -4756,7 +4756,7 @@ function reporting_html_availability_graph($table, $item, $pdf=0) $table_summary->data = []; $table_summary->data[0][0] = ''.__('Summary').''; - $table_summary->data[0][1] = ''; + $table_summary->data[0][1] = ''; $table_summary->data[0][1] .= sla_truncate($total_values / $count_total_charts); $table_summary->data[0][1] .= ' %'; $table_summary->data[0][1] .= '';