New item to reports (Log)... (Added some things to the new item)

This commit is contained in:
Arturo Gonzalez 2016-11-08 11:33:08 +01:00
parent 530a1e7a93
commit 47443f7af3
4 changed files with 4 additions and 42 deletions

View File

@ -2367,6 +2367,7 @@ function chooseType() {
case 'event_report_log':
$("#row_description").show();
$("#row_period").show();
$("#row_agent").show();
break;
case 'simple_graph':

View File

@ -469,40 +469,6 @@ function reporting_make_reporting_data($report = null, $id_report,
return reporting_check_structure_report($report);
}
function reporting_log ($report, $content) {
$return['type'] = 'event_report_log';
$period = $content['period'];
$date_limit = time() - $period;
if (empty($content['name'])) {
$content['name'] = __('Log report');
}
$return['title'] = $content['name'];
$return["description"] = $content["description"];
$return["date"] = reporting_get_date_text($report, $content);
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
$return['keys'] = array(__('Date'), __('Log'));
// LEER FICHERO DE LOG Y SACAR DATOS
$log_data = array();
$log_data = read_log_file_to_report($date_limit);
$data = array();
foreach ($result as $row) {
$data[] = array(
__('Date') => date ($config["date_format"], $row['utimestamp']),
__('Data') => $row['datos']);
}
$return["data"] = $data;
}
function read_log_file_to_report($date_limit) {
}
function reporting_SLA($report, $content, $type = 'dinamic',
$force_width_chart = null, $force_height_chart = null) {

View File

@ -101,7 +101,6 @@ function reporting_html_header(&$table, $mini, $title, $subtitle,
}
function reporting_html_print_report($report, $mini = false) {
foreach ($report['contents'] as $key => $item) {
$table = new stdClass();
$table->size = array ();
@ -293,10 +292,6 @@ function reporting_html_print_report($report, $mini = false) {
}
}
function reporting_html_log ($table, $item) {
html_debug('AAAA');
}
function reporting_html_SLA($table, $item, $mini) {
$style = db_get_value('style', 'treport_content', 'id_rc', $item['id_rc']);
$style = json_decode(io_safe_output($style), true);

View File

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