diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 67f4f90dd4..920447ddd5 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -8135,25 +8135,35 @@ function reporting_get_agents_by_status ($data, $graph_width = 250, $graph_heigh $agent_data = array(); $agent_data[0] = html_print_image('images/agent_critical.png', true, array('title' => __('Agents critical'))); - $agent_data[1] = "".$data["agent_critical"] <= 0 ? '-' : format_numeric($data['agent_critical']).""; + $agent_data[1] = ""; + $agent_data[1] .= format_numeric($data["agent_critical"]) <= 0 ? '-' : format_numeric($data['agent_critical']); + $agent_data[1] .= ""; $agent_data[2] = html_print_image('images/agent_warning.png', true, array('title' => __('Agents warning'))); - $agent_data[3] = "".$data["agent_warning"] <= 0 ? '-' : format_numeric($data['agent_warning']).""; + $agent_data[3] = ""; + $agent_data[3] .= $data["agent_warning"] <= 0 ? '-' : format_numeric($data['agent_warning']); + $agent_data[3] .= ""; $table_agent->data[] = $agent_data; $agent_data = array(); $agent_data[0] = html_print_image('images/agent_ok.png', true, array('title' => __('Agents ok'))); - $agent_data[1] = "".$data["agent_ok"] <= 0 ? '-' : format_numeric($data['agent_ok']).""; + $agent_data[1] = ""; + $agent_data[1] .= $data["agent_ok"] <= 0 ? '-' : format_numeric($data['agent_ok']); + $agent_data[1] .= ""; $agent_data[2] = html_print_image('images/agent_unknown.png', true, array('title' => __('Agents unknown'))); - $agent_data[3] = "".$data["agent_unknown"] <= 0 ? '-' : format_numeric($data['agent_unknown']).""; + $agent_data[3] = ""; + $agent_data[3] .= $data["agent_unknown"] <= 0 ? '-' : format_numeric($data['agent_unknown']); + $agent_data[3] .= ""; $table_agent->data[] = $agent_data; $agent_data = array(); $agent_data[0] = html_print_image('images/agent_notinit.png', true, array('title' => __('Agents not init'))); - $agent_data[1] = "".$data["agent_not_init"] <= 0 ? '-' : format_numeric($data['agent_not_init']).""; + $agent_data[1] = ""; + $agent_data[1] .= $data["agent_not_init"] <= 0 ? '-' : format_numeric($data['agent_not_init']); + $agent_data[1] .= ""; $agent_data[2] = ""; $agent_data[3] = ""; @@ -8210,7 +8220,9 @@ function reporting_get_total_servers ($num_servers) { $node_data = array(); $node_data[0] = html_print_image('images/server_export.png', true, array('title' => __('Nodes'))); - $node_data[1] = "".$num_servers <= 0 ? '-' : format_numeric($num_servers).""; + $node_data[1] = ""; + $node_data[1] .= $num_servers <= 0 ? '-' : format_numeric($num_servers); + $node_data[1] .= ""; $table_node->data[] = $node_data; if (!defined('METACONSOLE')){ @@ -8244,19 +8256,27 @@ function reporting_get_events ($data, $links = false) { $table_events->style[0] = "background-color:#FC4444"; $table_events->data[0][0] = html_print_image('images/module_event_critical.png', true, array('title' => __('Critical events'))); $table_events->data[0][0] .= "   " . - "" .$data['critical'] <= 0 ? '-' : format_numeric($data['critical']).""; + ""; + $table_events->data[0][0] .= format_numeric($data['critical']) <= 0 ? ' -' : format_numeric($data['critical']); + $table_events->data[0][0] .= ""; $table_events->style[1] = "background-color:#FAD403"; $table_events->data[0][1] = html_print_image('images/module_event_warning.png', true, array('title' => __('Warning events'))); $table_events->data[0][1] .= "   " . - "" .$data['warning'] <= 0 ? '-' : format_numeric($data['warning']).""; + ""; + $table_events->data[0][1] .= format_numeric($data['warning']) <= 0 ? ' -' : format_numeric($data['warning']); + $table_events->data[0][1] .= ""; $table_events->style[2] = "background-color:#80BA27"; $table_events->data[0][2] = html_print_image('images/module_event_ok.png', true, array('title' => __('OK events'))); $table_events->data[0][2] .= "   " . - "" .$data['normal'] <= 0 ? '-' : format_numeric($data['normal']).""; + ""; + $table_events->data[0][2] .= format_numeric($data['normal']) <= 0 ? ' -' : format_numeric($data['normal']); + $table_events->data[0][2] .= ""; $table_events->style[3] = "background-color:#B2B2B2"; $table_events->data[0][3] = html_print_image('images/module_event_unknown.png', true, array('title' => __('Unknown events'))); $table_events->data[0][3] .= "   " . - "" .$data['unknown'] <= 0 ? '-' : format_numeric($data['unknown']).""; + ""; + $table_events->data[0][3] .=format_numeric($data['unknown']) <= 0 ? ' -' : format_numeric($data['unknown']); + $table_events->data[0][3] .=""; } else{ $table_events->data[0][0] = html_print_image('images/module_critical.png', true, array('title' => __('Critical events')));