diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 5f7139a3c5..12077c6b39 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -1987,6 +1987,8 @@ function reporting_exception($report, $content, $type = 'dinamic', function reporting_group_report($report, $content) { global $config; + $metaconsole_on = ($config['metaconsole'] == 1) && defined('METACONSOLE'); + $return['type'] = 'group_report'; @@ -2004,7 +2006,14 @@ function reporting_group_report($report, $content) { $events = events_get_group_events( $content['id_group'], $content['period'], - $report['datetime']); + $report['datetime'], + false, + false, + false, + false, + false, + $metaconsole_on); + if (empty($events)) { $events = array(); } @@ -2012,6 +2021,8 @@ function reporting_group_report($report, $content) { $return["data"]["group_stats"] = reporting_get_group_stats($content['id_group']); + + return reporting_check_structure_content($return); } @@ -3953,6 +3964,16 @@ function reporting_simple_graph($report, $content, $type = 'dinamic', global $config; + + if ($config['metaconsole']) { + $id_meta = metaconsole_get_id_server($content["server_name"]); + + + $server = metaconsole_get_connection_by_id ($id_meta); + metaconsole_connect($server); + } + + $return = array(); $return['type'] = 'simple_graph'; @@ -3960,12 +3981,16 @@ function reporting_simple_graph($report, $content, $type = 'dinamic', $content['name'] = __('Simple graph'); } + + $module_name = io_safe_output( modules_get_agentmodule_name($content['id_agent_module'])); $agent_name = io_safe_output( modules_get_agentmodule_agent_name ($content['id_agent_module'])); + + $return['title'] = $content['name']; $return['subtitle'] = $agent_name . " - " . $module_name; $return["description"] = $content["description"]; @@ -4060,6 +4085,10 @@ function reporting_simple_graph($report, $content, $type = 'dinamic', break; } + if ($config['metaconsole']) { + metaconsole_restore_db(); + } + return reporting_check_structure_content($return); } @@ -4698,7 +4727,7 @@ function reporting_get_group_stats ($id_group = 0, $access = 'AR') { // ----------------------------------------------------------------- if ($config["realtimestats"] == 0) { - if (!is_array($id_group)){ + if (!is_array($id_group)) { $my_group = $id_group; $id_group = array(); $id_group[0] = $my_group; diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 2ce89347f8..0e7dfa6089 100755 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -988,6 +988,7 @@ function reporting_html_exception($table, $item) { function reporting_html_group_report($table, $item) { global $config; + $table->colspan['group_report']['cell'] = 3; $table->cellstyle['group_report']['cell'] = 'text-align: center;'; $table->data['group_report']['cell'] = "<table width='100%'>