Ent 4801 error informes pdf csv

This commit is contained in:
Tatiana Llorente 2019-11-04 18:41:03 +01:00 committed by Daniel Rodriguez
parent 777bbdd180
commit c83b85c225
7 changed files with 11 additions and 306 deletions

View File

@ -238,19 +238,6 @@ function output_xml_report($id)
echo '<line_separator><![CDATA['.io_safe_output($item['line_separator']).']]></line_separator>'; echo '<line_separator><![CDATA['.io_safe_output($item['line_separator']).']]></line_separator>';
echo '<column_separator><![CDATA['.io_safe_output($item['header_definition']).']]></column_separator>'; echo '<column_separator><![CDATA['.io_safe_output($item['header_definition']).']]></column_separator>';
break; break;
/*
case 'TTRT':
break;
case 'TTO':
break;
case 'MTBF':
break;
case 'MTTR':
break;*/
} }
echo "</item>\n"; echo "</item>\n";

View File

@ -375,19 +375,6 @@ function process_upload_xml_report($xml, $group_filter=0)
$values['line_separator'] = io_safe_input($item['line_separator']); $values['line_separator'] = io_safe_input($item['line_separator']);
$values['column_separator'] = io_safe_input($item['column_separator']); $values['column_separator'] = io_safe_input($item['column_separator']);
break; break;
/*
case 'TTRT':
break;
case 'TTO':
break;
case 'MTBF':
break;
case 'MTTR':
break;*/
} }
if (empty($agents_item)) { if (empty($agents_item)) {

View File

@ -482,51 +482,6 @@ switch ($action) {
$period = $item['period']; $period = $item['period'];
break; break;
/*
case 'TTRT':
$description = $item['description'];
$idAgentModule = $item['id_agent_module'];
$idAgent = db_get_value_filter(
'id_agente',
'tagente_modulo',
['id_agente_modulo' => $idAgentModule]
);
$period = $item['period'];
break;
case 'TTO':
$description = $item['description'];
$idAgentModule = $item['id_agent_module'];
$idAgent = db_get_value_filter(
'id_agente',
'tagente_modulo',
['id_agente_modulo' => $idAgentModule]
);
$period = $item['period'];
break;
case 'MTBF':
$description = $item['description'];
$idAgentModule = $item['id_agent_module'];
$idAgent = db_get_value_filter(
'id_agente',
'tagente_modulo',
['id_agente_modulo' => $idAgentModule]
);
$period = $item['period'];
break;
case 'MTTR':
$description = $item['description'];
$idAgentModule = $item['id_agent_module'];
$idAgent = db_get_value_filter(
'id_agente',
'tagente_modulo',
['id_agente_modulo' => $idAgentModule]
);
$period = $item['period'];
break;
*/
case 'alert_report_module': case 'alert_report_module':
$description = $item['description']; $description = $item['description'];
$idAgentModule = $item['id_agent_module']; $idAgentModule = $item['id_agent_module'];
@ -791,11 +746,6 @@ switch ($action) {
case 'avg_value': case 'avg_value':
case 'projection_graph': case 'projection_graph':
case 'prediction_date': case 'prediction_date':
/*
case 'TTRT':
case 'TTO':
case 'MTBF':
case 'MTTR':*/
case 'simple_baseline_graph': case 'simple_baseline_graph':
case 'event_report_log': case 'event_report_log':
case 'increment': case 'increment':
@ -3757,10 +3707,6 @@ $(document).ready (function () {
case 'event_report_module': case 'event_report_module':
case 'simple_graph': case 'simple_graph':
case 'simple_baseline_graph': case 'simple_baseline_graph':
/* case 'TTRT':
case 'TTO':
case 'MTBF':
case 'MTTR':*/
case 'prediction_date': case 'prediction_date':
case 'projection_graph': case 'projection_graph':
case 'avg_value': case 'avg_value':
@ -3798,10 +3744,6 @@ $(document).ready (function () {
case 'event_report_module': case 'event_report_module':
case 'simple_graph': case 'simple_graph':
case 'simple_baseline_graph': case 'simple_baseline_graph':
/* case 'TTRT':
case 'TTO':
case 'MTBF':
case 'MTTR':*/
case 'prediction_date': case 'prediction_date':
case 'projection_graph': case 'projection_graph':
case 'avg_value': case 'avg_value':
@ -4833,38 +4775,6 @@ function chooseType() {
$("#row_period").show(); $("#row_period").show();
$("#row_historical_db_check").hide(); $("#row_historical_db_check").hide();
break; break;
/*
case 'TTRT':
$("#row_description").show();
$("#row_agent").show();
$("#row_module").show();
$("#row_period").show();
$("#row_historical_db_check").hide();
break;
case 'TTO':
$("#row_description").show();
$("#row_agent").show();
$("#row_module").show();
$("#row_period").show();
$("#row_historical_db_check").hide();
break;
case 'MTBF':
$("#row_description").show();
$("#row_agent").show();
$("#row_module").show();
$("#row_period").show();
$("#row_historical_db_check").hide();
break;
case 'MTTR':
$("#row_description").show();
$("#row_agent").show();
$("#row_module").show();
$("#row_period").show();
$("#row_historical_db_check").hide();
break;*/
case 'alert_report_module': case 'alert_report_module':
$("#row_description").show(); $("#row_description").show();
@ -5218,10 +5128,6 @@ function chooseType() {
case 'min_value': case 'min_value':
case 'max_value': case 'max_value':
case 'avg_value': case 'avg_value':
/* case 'TTRT':
case 'TTO':
case 'MTBF':
case 'MTTR':*/
case 'simple_baseline_graph': case 'simple_baseline_graph':
$("#row_label").show(); $("#row_label").show();
break; break;

View File

@ -2006,11 +2006,6 @@ switch ($action) {
case 'avg_value': case 'avg_value':
case 'projection_graph': case 'projection_graph':
case 'prediction_date': case 'prediction_date':
/*
case 'TTRT':
case 'TTO':
case 'MTBF':
case 'MTTR':*/
case 'simple_baseline_graph': case 'simple_baseline_graph':
case 'nt_top_n': case 'nt_top_n':
if ($label != '') { if ($label != '') {
@ -2613,11 +2608,6 @@ switch ($action) {
case 'avg_value': case 'avg_value':
case 'projection_graph': case 'projection_graph':
case 'prediction_date': case 'prediction_date':
/*
case 'TTRT':
case 'TTO':
case 'MTBF':
case 'MTTR':*/
case 'simple_baseline_graph': case 'simple_baseline_graph':
case 'nt_top_n': case 'nt_top_n':
if ($label != '') { if ($label != '') {

View File

@ -506,43 +506,6 @@ function reporting_make_reporting_data(
); );
break; break;
/*
case 'MTTR':
$report['contents'][] = reporting_value(
$report,
$content,
'MTTR',
$pdf
);
break;
case 'MTBF':
$report['contents'][] = reporting_value(
$report,
$content,
'MTBF',
$pdf
);
break;
case 'TTO':
$report['contents'][] = reporting_value(
$report,
$content,
'TTO',
$pdf
);
break;
case 'TTRT':
$report['contents'][] = reporting_value(
$report,
$content,
'TTRT',
$pdf
);
break;
*/
case 'agent_configuration': case 'agent_configuration':
$report['contents'][] = io_safe_output( $report['contents'][] = io_safe_output(
reporting_agent_configuration( reporting_agent_configuration(
@ -3276,6 +3239,7 @@ function reporting_database_serialized($report, $content)
} }
$return['keys'] = $keys; $return['keys'] = $keys;
$return['agent_name_db'] = agents_get_name($id_agent);
$return['agent_name'] = $agent_alias; $return['agent_name'] = $agent_alias;
$return['module_name'] = $module_name; $return['module_name'] = $module_name;
@ -4303,6 +4267,7 @@ function reporting_monitor_report($report, $content)
); );
} }
$return['agent_name_db'] = agents_get_name($id_agent);
$return['agent_name'] = $agent_alias; $return['agent_name'] = $agent_alias;
$return['module_name'] = $module_name; $return['module_name'] = $module_name;
@ -4475,6 +4440,7 @@ function reporting_prediction_date($report, $content)
$agent_name = io_safe_output( $agent_name = io_safe_output(
modules_get_agentmodule_agent_alias($content['id_agent_module']) modules_get_agentmodule_agent_alias($content['id_agent_module'])
); );
$agent_name_db = io_safe_output(modules_get_agentmodule_agent_name($content['id_agent_module']));
$return['title'] = $content['name']; $return['title'] = $content['name'];
$return['subtitle'] = $agent_name.' - '.$module_name; $return['subtitle'] = $agent_name.' - '.$module_name;
@ -4482,6 +4448,7 @@ function reporting_prediction_date($report, $content)
$return['date'] = reporting_get_date_text($report, $content); $return['date'] = reporting_get_date_text($report, $content);
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : ''; $return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
$return['agent_name_db'] = $agent_name_db;
$return['agent_name'] = $agent_name; $return['agent_name'] = $agent_name;
$return['module_name'] = $module_name; $return['module_name'] = $module_name;
@ -4526,12 +4493,14 @@ function reporting_projection_graph(
$module_name = io_safe_output(modules_get_agentmodule_name($content['id_agent_module'])); $module_name = io_safe_output(modules_get_agentmodule_name($content['id_agent_module']));
$agent_name = io_safe_output(modules_get_agentmodule_agent_alias($content['id_agent_module'])); $agent_name = io_safe_output(modules_get_agentmodule_agent_alias($content['id_agent_module']));
$agent_name_db = io_safe_output(modules_get_agentmodule_agent_name($content['id_agent_module']));
$return['title'] = $content['name']; $return['title'] = $content['name'];
$return['subtitle'] = $agent_name.' - '.$module_name; $return['subtitle'] = $agent_name.' - '.$module_name;
$return['description'] = $content['description']; $return['description'] = $content['description'];
$return['date'] = reporting_get_date_text($report, $content); $return['date'] = reporting_get_date_text($report, $content);
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : ''; $return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
$return['agent_name_db'] = $agent_name_db;
$return['agent_name'] = $agent_name; $return['agent_name'] = $agent_name;
$return['module_name'] = $module_name; $return['module_name'] = $module_name;
@ -4727,23 +4696,6 @@ function reporting_value($report, $content, $type, $pdf=false)
case 'sum': case 'sum':
$return['type'] = 'sumatory'; $return['type'] = 'sumatory';
break; break;
/*
case 'MTTR':
$return['type'] = 'MTTR';
break;
case 'MTBF':
$return['type'] = 'MTBF';
break;
case 'TTO':
$return['type'] = 'TTO';
break;
case 'TTRT':
$return['type'] = 'TTRT';
break;*/
} }
if (empty($content['name'])) { if (empty($content['name'])) {
@ -4763,23 +4715,6 @@ function reporting_value($report, $content, $type, $pdf=false)
case 'sum': case 'sum':
$content['name'] = __('Summatory'); $content['name'] = __('Summatory');
break; break;
/*
case 'MTTR':
$content['name'] = __('MTTR');
break;
case 'MTBF':
$content['name'] = __('MTBF');
break;
case 'TTO':
$content['name'] = __('TTO');
break;
case 'TTRT':
$content['name'] = __('TTRT');
break;*/
} }
} }
@ -4796,6 +4731,9 @@ function reporting_value($report, $content, $type, $pdf=false)
$agent_name = io_safe_output( $agent_name = io_safe_output(
modules_get_agentmodule_agent_alias($content['id_agent_module']) modules_get_agentmodule_agent_alias($content['id_agent_module'])
); );
$agent_name_db = io_safe_output(
modules_get_agentmodule_agent_name($content['id_agent_module'])
);
$unit = db_get_value( $unit = db_get_value(
'unit', 'unit',
'tagente_modulo', 'tagente_modulo',
@ -4812,6 +4750,7 @@ function reporting_value($report, $content, $type, $pdf=false)
$return['id_agent'] = $content['id_agent']; $return['id_agent'] = $content['id_agent'];
$return['id_agent_module'] = $content['id_agent_module']; $return['id_agent_module'] = $content['id_agent_module'];
$return['agent_name_db'] = $agent_name_db;
$return['agent_name'] = $agent_name; $return['agent_name'] = $agent_name;
$return['module_name'] = $module_name; $return['module_name'] = $module_name;
@ -4952,51 +4891,6 @@ function reporting_value($report, $content, $type, $pdf=false)
$formated_value = format_for_graph($value, $config['graph_precision']).' '.$unit; $formated_value = format_for_graph($value, $config['graph_precision']).' '.$unit;
} }
break; break;
/*
case 'MTTR':
$value = reporting_get_agentmodule_mttr(
$content['id_agent_module'],
$content['period'],
$report['datetime']
);
$formated_value = null;
break;
case 'MTBF':
$value = reporting_get_agentmodule_mtbf(
$content['id_agent_module'],
$content['period'],
$report['datetime']
);
$formated_value = null;
break;
case 'TTO':
$value = reporting_get_agentmodule_tto(
$content['id_agent_module'],
$content['period'],
$report['datetime']
);
if ($value == 0) {
$formated_value = null;
} else {
$formated_value = human_time_description_raw($value);
}
break;
case 'TTRT':
$value = reporting_get_agentmodule_ttr(
$content['id_agent_module'],
$content['period'],
$report['datetime']
);
if ($value == 0) {
$formated_value = null;
} else {
$formated_value = human_time_description_raw($value);
}
break;*/
} }
$return['data'] = [ $return['data'] = [
@ -7755,6 +7649,7 @@ function reporting_simple_graph(
$return['title'] = $content['name']; $return['title'] = $content['name'];
$return['subtitle'] = $agent_alias.' - '.$module_name; $return['subtitle'] = $agent_alias.' - '.$module_name;
$return['agent_name_db'] = agents_get_name($id_agent);
$return['agent_name'] = $agent_alias; $return['agent_name'] = $agent_alias;
$return['module_name'] = $module_name; $return['module_name'] = $module_name;
$return['description'] = $content['description']; $return['description'] = $content['description'];

View File

@ -288,23 +288,6 @@ function reporting_html_print_report($report, $mini=false, $report_info=1)
reporting_html_sum_value($table, $item, $mini); reporting_html_sum_value($table, $item, $mini);
break; break;
/*
case 'MTTR':
reporting_html_MTTR_value($table, $item, $mini, true, true);
break;
case 'MTBF':
reporting_html_MTBF_value($table, $item, $mini, true, true);
break;
case 'TTO':
reporting_html_TTO_value($table, $item, $mini, false, true);
break;
case 'TTRT':
reporting_html_TTRT_value($table, $item, $mini, false, true);
break;
*/
case 'agent_configuration': case 'agent_configuration':
reporting_html_agent_configuration($table, $item); reporting_html_agent_configuration($table, $item);
break; break;
@ -2729,31 +2712,6 @@ function reporting_html_agent_configuration(
} }
/*
function reporting_html_TTRT_value(&$table, $item, $mini, $only_value=false, $check_empty=false)
{
reporting_html_value($table, $item, $mini, $only_value, $check_empty);
}
function reporting_html_TTO_value(&$table, $item, $mini, $only_value=false, $check_empty=false)
{
reporting_html_value($table, $item, $mini, $only_value, $check_empty);
}
function reporting_html_MTBF_value(&$table, $item, $mini, $only_value=false, $check_empty=false)
{
reporting_html_value($table, $item, $mini, $only_value, $check_empty);
}
function reporting_html_MTTR_value(&$table, $item, $mini, $only_value=false, $check_empty=false)
{
reporting_html_value($table, $item, $mini, $only_value, $check_empty);
}
*/
function reporting_html_sum_value(&$table, $item, $mini) function reporting_html_sum_value(&$table, $item, $mini)
{ {
reporting_html_value($table, $item, $mini); reporting_html_value($table, $item, $mini);

View File

@ -679,24 +679,6 @@ function reports_get_report_types($template=false, $not_editor=false)
'name' => __('Module Histogram graph'), 'name' => __('Module Histogram graph'),
]; ];
/*
$types['TTRT'] = [
'optgroup' => __('ITIL'),
'name' => __('TTRT'),
];
$types['TTO'] = [
'optgroup' => __('ITIL'),
'name' => __('TTO'),
];
$types['MTBF'] = [
'optgroup' => __('ITIL'),
'name' => __('MTBF'),
];
$types['MTTR'] = [
'optgroup' => __('ITIL'),
'name' => __('MTTR'),
];
*/
$types['SLA'] = [ $types['SLA'] = [
'optgroup' => __('SLA'), 'optgroup' => __('SLA'),
'name' => __('S.L.A.'), 'name' => __('S.L.A.'),