From c63be5b4ccba2139434a67417ecf449ca58a2dfe Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 4 Dec 2018 10:19:26 +0100 Subject: [PATCH] fixed error print pdf chart slice bars --- pandora_console/include/chart_generator.php | 4 +++- pandora_console/include/functions_reporting.php | 8 +++++--- .../include/graphs/functions_flot.php | 16 +++++++++------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/pandora_console/include/chart_generator.php b/pandora_console/include/chart_generator.php index d11445b1dc..d8142b2548 100644 --- a/pandora_console/include/chart_generator.php +++ b/pandora_console/include/chart_generator.php @@ -202,7 +202,9 @@ if (file_exists ('languages/'.$user_language.'.mo')) { $params['id_agent'], $params['full_legend_daterray'], $params['not_interactive'], - 1 + $params['ttl'], + $params['widgets'], + $params['show'] ); break; default: diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index f691a1bf0e..0e1d7390fa 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -634,7 +634,9 @@ function reporting_make_reporting_data($report = null, $id_report, $content, $type, $force_width_chart, - $force_height_chart); + $force_height_chart, + $pdf + ); break; case 'module_histogram_graph': $report['contents'][] = reporting_enterprise_module_histogram_graph( @@ -1172,10 +1174,10 @@ function reporting_event_top_n($report, $content, $type = 'dinamic', } } - $ag_name = modules_get_agentmodule_agent_alias($row ['id_agent_module']); + $ag_name = modules_get_agentmodule_agent_alias($row ['id_agent_module']); $mod_name = modules_get_agentmodule_name ($row ['id_agent_module']); $unit = db_get_value('unit', 'tagente_modulo', - 'id_agente_modulo', $row ['id_agent_module']); + 'id_agente_modulo', $row ['id_agent_module']); switch ($top_n) { diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index e519505085..7524fc119e 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -706,13 +706,15 @@ function flot_slicesbar_graph ( 'fontpath' => $fontpath, 'round_corner' => $round_corner, 'homeurl' => $homeurl, - 'watermark' => $watermark = '', - 'adapt_key' => $adapt_key = '', - 'stat_win' => $stat_win = false, - 'id_agent' => $id_agent = 0, - 'full_legend_date' => $full_legend_date = array(), - 'not_interactive' => $not_interactive = 0, - 'ttl' => $ttl = 1 + 'watermark' => $watermark, + 'adapt_key' => $adapt_key, + 'stat_win' => $stat_win, + 'id_agent' => $id_agent, + 'full_legend_date' => $full_legend_date, + 'not_interactive' => $not_interactive, + 'ttl' => 1, + 'widgets' => $widgets, + 'show' => $show ); return generator_chart_to_pdf('slicebar', $params);