Fixed the 'projection_graph' item in metaconsole reports. TICKET: #2249

This commit is contained in:
mdtrooper 2015-05-22 17:55:06 +02:00
parent 10efebee28
commit 29743cfa74

View File

@ -2999,6 +2999,14 @@ function reporting_projection_graph($report, $content,
global $config; 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['type'] = 'projection_graph'; $return['type'] = 'projection_graph';
if (empty($content['name'])) { if (empty($content['name'])) {
@ -3047,9 +3055,9 @@ function reporting_projection_graph($report, $content,
0, 0,
0, 0,
$report["datetime"], $report["datetime"],
true, $only_image,
ui_get_full_url(false, false, false, false) . '/', ui_get_full_url(false, false, false, false) . '/',
1, $ttl,
// Important parameter, this tell to graphic_combined_module function that is a projection graph // Important parameter, this tell to graphic_combined_module function that is a projection graph
$output_projection, $output_projection,
$content['top_n_value'] $content['top_n_value']
@ -3059,6 +3067,10 @@ function reporting_projection_graph($report, $content,
break; break;
} }
if ($config['metaconsole']) {
metaconsole_restore_db();
}
return reporting_check_structure_content($return); return reporting_check_structure_content($return);
} }