2011-11-04 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php include/graphs/fgraph.php include/functions_reporting.php operation/agentes/ver_agente.php: Modules in 'top_n' reports are sorted and graphs are displayed. Fixes: #3422013 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5113 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
6c531101af
commit
8a9aa145a1
|
@ -1,3 +1,13 @@
|
|||
2011-11-04 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_graph.php
|
||||
include/graphs/fgraph.php
|
||||
include/functions_reporting.php
|
||||
operation/agentes/ver_agente.php: Modules in 'top_n' reports are
|
||||
sorted and graphs are displayed.
|
||||
|
||||
Fixes: #3422013
|
||||
|
||||
2011-11-03 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* include/functions_html.php: Skip config.php loading after load
|
||||
|
|
|
@ -1514,6 +1514,10 @@ function graph_custom_sql_graph ($id, $width, $height, $type = 'sql_graph_vbar',
|
|||
}
|
||||
|
||||
$flash_charts = $config['flash_charts'];
|
||||
|
||||
if ($flash_charts){
|
||||
include_flash_chart_script();
|
||||
}
|
||||
|
||||
if ($only_image) {
|
||||
$flash_charts = false;
|
||||
|
|
|
@ -3438,7 +3438,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$data_pie_graph = array();
|
||||
$data_hbar = array();
|
||||
foreach ($data_top as $dt) {
|
||||
$data_hbar[$agent_name[$i]]['g'] = $dt;
|
||||
$data_hbar[$agent_name[$i]]['g'] = $dt;
|
||||
$data_pie_graph[$agent_name[$i]] = $dt;
|
||||
if ($show_graph == 0 || $show_graph == 1) {
|
||||
$data = array();
|
||||
|
@ -3449,12 +3449,12 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
}
|
||||
$i++;
|
||||
if ($i >= $top_n_value) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ($order_uptodown == 0 || $order_uptodown == 3) {
|
||||
$i = 0;
|
||||
$data_pie_graph = array();
|
||||
$data_hbar = array();
|
||||
$data_hbar = array();
|
||||
foreach ($agent_name as $an) {
|
||||
$data_pie_graph[$an] = $data_top[$i];
|
||||
$data_hbar[$an]['g'] = $data_top[$i];
|
||||
|
@ -3479,7 +3479,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
|
||||
$table->colspan[3][0] = 3;
|
||||
$data = array();
|
||||
if ($show_graph == 1 || $show_graph == 2) {
|
||||
if ($show_graph == 1 || $show_graph == 2) {
|
||||
$data[0] = pie3d_graph($config['flash_charts'], $data_pie_graph,
|
||||
600, 150, __("other"),"", $config['homedir'] . "/images/logo_vertical_water.png",
|
||||
$config['fontpath'], $config['font_size']);
|
||||
|
@ -3489,11 +3489,11 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$table->colspan[4][0] = 3;
|
||||
$height = count($data_pie_graph)*20+35;
|
||||
$data = array();
|
||||
$data[0] = hbar_graph($config['flash_charts'], $data_hbar, 600, $height);
|
||||
|
||||
$data[0] = hbar_graph($config['flash_charts'], $data_hbar, 600, $height, array(), array(), "", "", true, "", $config['homedir'] . "/images/logo_vertical_water.png", '', '', true, 1, true);
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
||||
|
||||
if ($content['show_resume'] && count($data_top_values) > 0) {
|
||||
//Get the very first not null value
|
||||
$i=0;
|
||||
|
@ -3772,7 +3772,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$height = count($data_pie_graph)*20+35;
|
||||
$data = array();
|
||||
|
||||
$data[0] = hbar_graph($config['flash_charts'], $data_hbar, 600, $height);
|
||||
$data[0] = hbar_graph($config['flash_charts'], $data_hbar, 600, $height, array(), array(), "", "", true, "", $config['homedir'] . "/images/logo_vertical_water.png", '', '', true, 1, true);
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
|
|
@ -341,9 +341,15 @@ function polar_graph($flash_chart, $chart_data, $width, $height, $no_data_image,
|
|||
|
||||
function hbar_graph($flash_chart, $chart_data, $width, $height, $color = array(),
|
||||
$legend = array(), $xaxisname = "", $yaxisname = "", $force_height = true,
|
||||
$homedir="", $water_mark = '', $font = '', $font_size = '', $force_steps = true, $ttl = 1) {
|
||||
$homedir="", $water_mark = '', $font = '', $font_size = '', $force_steps = true, $ttl = 1, $return = false) {
|
||||
if($flash_chart) {
|
||||
echo fs_2d_hcolumn_chart ($chart_data, $width, $height);
|
||||
include_flash_chart_script();
|
||||
if ($return){
|
||||
return fs_2d_hcolumn_chart ($chart_data, $width, $height);
|
||||
}
|
||||
else{
|
||||
echo fs_2d_hcolumn_chart ($chart_data, $width, $height);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$graph = array();
|
||||
|
|
|
@ -204,7 +204,8 @@ if (is_ajax ()) {
|
|||
SELECT count(nombre)
|
||||
FROM tagente_modulo t2
|
||||
WHERE delete_pending = 0 AND t1.nombre = t2.nombre
|
||||
AND id_agente IN (' . implode(',', $idAgents) . ')) = (' . count($idAgents) . ')');
|
||||
AND id_agente IN (' . implode(',', $idAgents) . ')) = (' . count($idAgents) . ')
|
||||
ORDER BY nombre');
|
||||
|
||||
if ($nameModules == false) {
|
||||
$nameModules = array();
|
||||
|
|
Loading…
Reference in New Issue