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
1 changed files with 14 additions and 2 deletions

View File

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