Merge branch 'ent-4134-los-informes-no-funcionan-al-exportar-a-csv-json-ni-xml' into 'develop'
Remove entities from json reports See merge request artica/pandorafms!2512
This commit is contained in:
commit
9a24c90725
|
@ -151,11 +151,13 @@ function reporting_make_reporting_data(
|
||||||
$contents = $report['contents'];
|
$contents = $report['contents'];
|
||||||
} else {
|
} else {
|
||||||
$report = io_safe_output(db_get_row('treport', 'id_report', $id_report));
|
$report = io_safe_output(db_get_row('treport', 'id_report', $id_report));
|
||||||
$contents = db_get_all_rows_field_filter(
|
$contents = io_safe_output(
|
||||||
|
db_get_all_rows_field_filter(
|
||||||
'treport_content',
|
'treport_content',
|
||||||
'id_report',
|
'id_report',
|
||||||
$id_report,
|
$id_report,
|
||||||
db_escape_key_identifier('order')
|
db_escape_key_identifier('order')
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,26 +328,32 @@ function reporting_make_reporting_data(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'general':
|
case 'general':
|
||||||
$report['contents'][] = reporting_general(
|
$report['contents'][] = io_safe_output(
|
||||||
|
reporting_general(
|
||||||
$report,
|
$report,
|
||||||
$content
|
$content
|
||||||
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'availability':
|
case 'availability':
|
||||||
$report['contents'][] = reporting_availability(
|
$report['contents'][] = io_safe_output(
|
||||||
|
reporting_availability(
|
||||||
$report,
|
$report,
|
||||||
$content,
|
$content,
|
||||||
$date,
|
$date,
|
||||||
$time
|
$time
|
||||||
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'availability_graph':
|
case 'availability_graph':
|
||||||
$report['contents'][] = reporting_availability_graph(
|
$report['contents'][] = io_safe_output(
|
||||||
|
reporting_availability_graph(
|
||||||
$report,
|
$report,
|
||||||
$content,
|
$content,
|
||||||
$pdf
|
$pdf
|
||||||
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -475,9 +483,11 @@ function reporting_make_reporting_data(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'agent_configuration':
|
case 'agent_configuration':
|
||||||
$report['contents'][] = reporting_agent_configuration(
|
$report['contents'][] = io_safe_output(
|
||||||
|
reporting_agent_configuration(
|
||||||
$report,
|
$report,
|
||||||
$content
|
$content
|
||||||
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -673,12 +683,14 @@ function reporting_make_reporting_data(
|
||||||
|
|
||||||
case 'agent_detailed_event':
|
case 'agent_detailed_event':
|
||||||
case 'event_report_agent':
|
case 'event_report_agent':
|
||||||
$report_control = reporting_event_report_agent(
|
$report_control = io_safe_output(
|
||||||
|
reporting_event_report_agent(
|
||||||
$report,
|
$report,
|
||||||
$content,
|
$content,
|
||||||
$type,
|
$type,
|
||||||
$force_width_chart,
|
$force_width_chart,
|
||||||
$force_height_chart
|
$force_height_chart
|
||||||
|
)
|
||||||
);
|
);
|
||||||
if ($report_control['total_events'] == 0 && $content['hide_no_data'] == 1) {
|
if ($report_control['total_events'] == 0 && $content['hide_no_data'] == 1) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -2176,7 +2188,7 @@ function reporting_agent_module($report, $content)
|
||||||
foreach ($agents as $agent) {
|
foreach ($agents as $agent) {
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['agent_status'][$agent] = agents_get_status($agent);
|
$row['agent_status'][$agent] = agents_get_status($agent);
|
||||||
$row['agent_name'] = agents_get_alias($agent);
|
$row['agent_name'] = io_safe_output(agents_get_alias($agent));
|
||||||
$agent_modules = agents_get_modules($agent);
|
$agent_modules = agents_get_modules($agent);
|
||||||
|
|
||||||
$row['modules'] = [];
|
$row['modules'] = [];
|
||||||
|
@ -2777,7 +2789,7 @@ function reporting_event_report_agent(
|
||||||
}
|
}
|
||||||
|
|
||||||
$return['title'] = $content['name'];
|
$return['title'] = $content['name'];
|
||||||
$return['subtitle'] = agents_get_alias($content['id_agent']);
|
$return['subtitle'] = io_safe_output(agents_get_alias($content['id_agent']));
|
||||||
$return['description'] = $content['description'];
|
$return['description'] = $content['description'];
|
||||||
$return['date'] = reporting_get_date_text($report, $content);
|
$return['date'] = reporting_get_date_text($report, $content);
|
||||||
|
|
||||||
|
@ -6073,7 +6085,7 @@ function reporting_advanced_sla(
|
||||||
|
|
||||||
// SLA.
|
// SLA.
|
||||||
$return['SLA'] = reporting_sla_get_compliance_from_array($return);
|
$return['SLA'] = reporting_sla_get_compliance_from_array($return);
|
||||||
$return['SLA_fixed'] = sla_truncate(
|
$return['sla_fixed'] = sla_truncate(
|
||||||
$return['SLA'],
|
$return['SLA'],
|
||||||
$config['graph_precision']
|
$config['graph_precision']
|
||||||
);
|
);
|
||||||
|
@ -6396,10 +6408,12 @@ function reporting_availability_graph($report, $content, $pdf=false)
|
||||||
$edge_interval = 10;
|
$edge_interval = 10;
|
||||||
|
|
||||||
if (empty($content['subitems'])) {
|
if (empty($content['subitems'])) {
|
||||||
$slas = db_get_all_rows_field_filter(
|
$slas = io_safe_output(
|
||||||
|
db_get_all_rows_field_filter(
|
||||||
'treport_content_sla_combined',
|
'treport_content_sla_combined',
|
||||||
'id_report_content',
|
'id_report_content',
|
||||||
$content['id_rc']
|
$content['id_rc']
|
||||||
|
)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$slas = $content['subitems'];
|
$slas = $content['subitems'];
|
||||||
|
|
Loading…
Reference in New Issue