Merge branch 'feature/log_in_reports' into 'develop'

Feature/log in reports

See merge request !178
This commit is contained in:
artu30 2017-02-21 12:15:34 +01:00
commit c9e89921d2
4 changed files with 49 additions and 3 deletions

View File

@ -142,6 +142,7 @@ switch ($action) {
case 'general':
case 'network_interfaces_report':
case 'availability':
case 'event_report_log':
case 'availability_graph':
case 'agent_module':
$get_data_editor = true;
@ -193,7 +194,9 @@ switch ($action) {
$idAgentModule = $item['id_agent_module'];
$idAgent = db_get_value_filter('id_agente', 'tagente_modulo', array('id_agente_modulo' => $idAgentModule));
break;
case 'event_report_log':
$period = $item['period'];
$description = $item['description'];
case 'simple_graph':
$only_avg = isset($style['only_avg']) ? (bool) $style['only_avg'] : true;
$percentil = isset($style['percentil']) ? $config['percentil'] : 0;
@ -569,6 +572,7 @@ switch ($action) {
case 'MTBF':
case 'MTTR':
case 'simple_baseline_graph':
case 'event_report_log':
$label = (isset($style['label'])) ? $style['label'] : '';
break;
default:
@ -632,7 +636,12 @@ You can of course remove the warnings, that's why we include the source and do n
echo '<input type="hidden" id="type" name="type" value="' . $type . '" />';
}
?>
<?php
$text = __('This type of report brings a lot of data loading, it is recommended to use it for scheduled reports and not for real-time view.');
echo '<a id="log_help_tip" style="visibility: hidden;" href="javascript:" class="tip" >' . html_print_image ("images/tip.png", true, array('title' => $text)) . '</a>';
?>
</td>
</tr>
<tr id="row_name" style="" class="datos">
@ -2534,6 +2543,7 @@ function chooseType() {
$("#row_last_value").hide();
$("#row_filter_search").hide();
$("#row_percentil").hide();
$("#log_help_tip").css("visibility", "hidden");
$("#agents_row").hide();
$("#select_agent_modules").hide();
$("#modules_row").hide();
@ -2556,6 +2566,30 @@ function chooseType() {
$('#agent_autocomplete_events').show();
switch (type) {
case 'event_report_group':
$("#row_description").show();
$("#row_period").show();
$("#row_servers").show();
$("#row_group").show();
$("#row_show_in_two_columns").show();
$("#row_event_filter").show();
$("#row_event_graphs").show();
$("#row_event_graph_by_agent").show();
$("#row_event_graph_by_user").show();
$("#row_event_graph_by_criticity").show();
$("#row_event_graph_by_validated").show();
$("#row_filter_search").show();
break;
case 'event_report_log':
$("#log_help_tip").css("visibility", "visible");
$("#row_description").show();
$("#row_period").show();
$("#row_agent").show();
break;
case 'simple_graph':
$("#row_time_compare_overlapped").show();
$("#row_only_avg").show();

View File

@ -165,6 +165,12 @@ function reporting_make_reporting_data($report = null, $id_report,
$force_width_chart,
$force_height_chart);
break;
case 'event_report_log':
$report['contents'][] =
reporting_log(
$report,
$content);
break;
case 'general':
$report['contents'][] =
reporting_general(

View File

@ -174,6 +174,9 @@ function reporting_html_print_report($report, $mini = false, $report_info = 1) {
case 'availability':
reporting_html_availability($table, $item);
break;
case 'event_report_log':
reporting_html_log($table, $item);
break;
case 'availability_graph':
reporting_html_availability_graph($table, $item);
break;

View File

@ -633,8 +633,6 @@ function reports_get_report_types ($template = false, $not_editor = false) {
}
}
if (!$template) {
$types['agent_configuration'] = array('optgroup' => __('Configuration'),
'name' => __('Agent configuration'));
@ -651,6 +649,11 @@ function reports_get_report_types ($template = false, $not_editor = false) {
$types['netflow_summary'] = array('optgroup' => __('Netflow'),
'name' => __('Netflow summary table'));
}
if ($config['enterprise_installed']) {
$types['event_report_log'] = array('optgroup' => __('Log'),
'name' => __('Log report'));
}
return $types;
}