Merge branch '1326-Crear-un-checkbox-para-que-no-se-muestren-datos-vacíos-en-los-informes-open' into 'develop'

Add hide no data item checkbox to report templates - open - #1326

See merge request artica/pandorafms!940
This commit is contained in:
nramon 2017-11-30 12:57:59 +01:00
commit c7676d7f4a
1 changed files with 17 additions and 4 deletions

21
pandora_console/include/functions_reporting.php Normal file → Executable file
View File

@ -127,7 +127,7 @@ function reporting_make_reporting_data($report = null, $id_report,
}
$metaconsole_on = is_metaconsole();
$index_content = 0;
foreach ($contents as $content) {
$server_name = $content['server_name'];
@ -519,29 +519,41 @@ function reporting_make_reporting_data($report = null, $id_report,
break;
case 'agent_detailed_event':
case 'event_report_agent':
$report['contents'][] = reporting_event_report_agent(
$report_control = reporting_event_report_agent(
$report,
$content,
$type,
$force_width_chart,
$force_height_chart);
if($report_control['total_events'] == 0 && $content['hide_no_data'] == 1){
continue;
}
$report['contents'][] = $report_control;
break;
case 'event_report_module':
$report['contents'][] = reporting_event_report_module(
$report_control = reporting_event_report_module(
$report,
$content,
$type,
$force_width_chart,
$force_height_chart,
$pdf);
if($report_control['total_events'] == 0 && $content['hide_no_data'] == 1){
continue;
}
$report['contents'][] = $report_control;
break;
case 'event_report_group':
$report['contents'][] = reporting_event_report_group(
$report_control = reporting_event_report_group(
$report,
$content,
$type,
$force_width_chart,
$force_height_chart);
if($report_control['total_events'] == 0 && $content['hide_no_data'] == 1){
continue;
}
$report['contents'][] = $report_control;
break;
case 'top_n':
$report['contents'][] = reporting_event_top_n(
@ -589,6 +601,7 @@ function reporting_make_reporting_data($report = null, $id_report,
$pdf);
break;
}
$index_content++;
}
return reporting_check_structure_report($report);