diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 0662ff8b0d..00df36a2c7 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -69,6 +69,8 @@ $exception_condition = REPORT_EXCEPTION_CONDITION_EVERYTHING; $exception_condition_value = 10; $modulegroup = 0; $period = SECONDS_1DAY; +$search = ""; +$log_number = 1000; // Added support for projection graphs $period_pg = SECONDS_5DAY; $projection_period = SECONDS_5DAY; @@ -201,9 +203,12 @@ switch ($action) { case 'event_report_log': $period = $item['period']; $description = $item['description']; + $es = json_decode($item['external_source'], true); $id_agents = $es['id_agents']; $source = $es['source']; + $search = $es['search']; + $log_number = empty($es['log_number']) ? $log_number : $es['log_number']; break; case 'simple_graph': $only_avg = isset($style['only_avg']) ? (bool) $style['only_avg'] : true; @@ -705,6 +710,29 @@ You can of course remove the warnings, that's why we include the source and do n + + + + + + + + + + + + + + + "; + ?> + + + $value) { + $agents2[$value['id_agente']] = $value['alias']; + } + + // $agents = agents_get_group_agents($group); + if ((empty($agents2)) || $agents2 == -1) $agents = array(); $agents_select = array(); if (is_array($id_agents) || is_object($id_agents)){ foreach ($id_agents as $id) { - foreach ($agents as $key => $a) { + foreach ($agents2 as $key => $a) { if ($key == (int)$id) { $agents_select[$key] = $key; } } } } - html_print_select($agents, 'id_agents2[]', $agents_select, $script = '', "", 0, false, true, true, '', false, "min-width: 180px"); + // html_debug($agents); + html_print_select($agents2, 'id_agents2[]', $agents_select, $script = '', "", 0, false, true, true, '', false, "min-width: 180px"); ?> @@ -2578,6 +2616,8 @@ function chooseType() { $("#row_agent").hide(); $("#row_module").hide(); $("#row_period").hide(); + $("#row_search").hide(); + $("#row_log_number").hide(); $("#row_period1").hide(); $("#row_estimate").hide(); $("#row_interval").hide(); @@ -2675,6 +2715,8 @@ function chooseType() { $("#log_help_tip").css("visibility", "visible"); $("#row_description").show(); $("#row_period").show(); + $("#row_search").show(); + $("#row_log_number").show(); $("#agents_row").show(); $("#row_source").show(); $("#row_historical_db_check").hide(); diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index ac6d35d4b4..705f49c2d0 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -925,9 +925,13 @@ switch ($action) { case 'event_report_log': $agents_to_report = get_parameter('id_agents2'); $source = get_parameter('source', ""); - + $search = get_parameter('search', ""); + $log_number = get_parameter('log_number', ""); + $es['source'] = $source; $es['id_agents'] = $agents_to_report; + $es['search']=$search; + $es['log_number']=$log_number; $values['external_source'] = json_encode($es); $values['period'] = get_parameter('period'); @@ -1281,9 +1285,13 @@ switch ($action) { case 'event_report_log': $agents_to_report = get_parameter('id_agents2'); $source = get_parameter('source', ""); - + $search = get_parameter('search', ""); + $log_number = get_parameter('log_number', ""); + $es['source'] = $source; $es['id_agents'] = $agents_to_report; + $es['search']=$search; + $es['log_number']=$log_number; $values['external_source'] = json_encode($es); $values['period'] = get_parameter('period');