diff --git a/pandora_console/godmode/events/event_edit_filter.php b/pandora_console/godmode/events/event_edit_filter.php
index f83d19e14d..8c305fd90f 100644
--- a/pandora_console/godmode/events/event_edit_filter.php
+++ b/pandora_console/godmode/events/event_edit_filter.php
@@ -399,9 +399,8 @@ if (!is_metaconsole()) {
$text_module, false, true, '', array(), true, $id_agent_module);
}
-$sources = events_get_all_source();
$table ->data[22][0] = '' . __('Source') . '';
-$table ->data[22][1] = html_print_select ($sources, 'source', $source, '', '', '', true);
+$table ->data[22][1] = html_print_input_text ('source', $source, '', 35, 255, true);
$table ->data[23][0] = '' . __('Extra ID') . '';
$table ->data[23][1] = html_print_input_text ('id_extra', $id_extra, '', 11, 255, true);
diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php
index 33ca35c24a..39c5fa59ae 100644
--- a/pandora_console/include/functions_events.php
+++ b/pandora_console/include/functions_events.php
@@ -1531,30 +1531,6 @@ function events_get_all_status ($report = false) {
return $fields;
}
-/**
- * Return all event source.
- *
- * @return array event source array.
- */
-function events_get_all_source () {
- $event_table = events_get_events_table(is_metaconsole(),false);
- $fields = array ();
- $fields[''] = __('All');
-
- if (users_is_admin()) {
- $sources = db_get_all_rows_sql("SELECT DISTINCT(source) FROM ". $event_table);
- } else {
- $groups_user = users_get_groups ($config['id_user'], "ER", true);
- $sources = db_get_all_rows_sql("SELECT DISTINCT(source) FROM ". $event_table. " WHERE id_grupo IN (" .implode(",",array_keys($groups_user)) .")");
- }
-
- foreach ($sources as $key => $source) {
- $fields[$source['source']] = $source['source'];
- }
-
- return $fields;
-}
-
/**
* Decode a numeric status into status description.
*
diff --git a/pandora_console/operation/events/events.build_query.php b/pandora_console/operation/events/events.build_query.php
index 79a4a0538a..c06d2ac6c9 100755
--- a/pandora_console/operation/events/events.build_query.php
+++ b/pandora_console/operation/events/events.build_query.php
@@ -158,7 +158,7 @@ if ($user_comment != '') {
}
if ($source != '') {
- $sql_post .= " AND source LIKE '$source'";
+ $sql_post .= " AND source LIKE '%$source%'";
}
// In metaconsole mode the agent search is performed by name
diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php
index 2add378167..068011f796 100644
--- a/pandora_console/operation/events/events_list.php
+++ b/pandora_console/operation/events/events_list.php
@@ -666,9 +666,8 @@ $table->data[] = $data;
$table->rowclass[] = '';
$data = array();
-$sources = events_get_all_source();
$data[0] = __('Source') . $jump;
-$data[0] .= html_print_select ($sources, 'source', $source, '', '', '', true);
+$data[0] .= html_print_input_text ('source', $source, '', 35, 255, true);
$data[1] = __('Extra ID') . $jump;
$data[1] .= html_print_input_text ('id_extra', $id_extra, '', 11, 255, true);
$data[2] = __("Comment") . $jump;
@@ -975,7 +974,7 @@ $(document).ready( function() {
if (i == 'id_group_filter')
$("#id_group_filter").val(val);
if (i == 'source')
- $("#source").val(val);
+ $("#text-source").val(val);
if (i == 'id_extra')
$("#text-id_extra").val(val);
if (i == 'user_comment')
@@ -1018,7 +1017,7 @@ $(document).ready( function() {
$("#pagination").val(20);
$("#update_from_filter_table").val(1);
$("#text_id_agent").val("");
- $("#source").val('');
+ $("#text-source").val('');
$("#text-id_extra").val('');
$("#text-user_comment").val('');
@@ -1090,7 +1089,7 @@ $(document).ready( function() {
}
}
if (i == 'source')
- $("#source").val(val);
+ $("#text-source").val(val);
if (i == 'id_extra')
$("#text-id_extra").val(val);
if (i == 'user_comment')
@@ -1161,7 +1160,7 @@ $(document).ready( function() {
"id_group_filter": $("#id_group_filter").val(),
"date_from": $("#text-date_from").val(),
"date_to": $("#text-date_to").val(),
- "source": $("#source").val(),
+ "source": $("#text-source").val(),
"id_extra": $("#text-id_extra").val(),
"user_comment": $("#text-user_comment").val()
},
@@ -1261,7 +1260,7 @@ $(document).ready( function() {
"id_group_filter": $("#id_group_filter").val(),
"date_from": $("#text-date_from").val(),
"date_to": $("#text-date_to").val(),
- "source": $("#source").val(),
+ "source": $("#text-source").val(),
"id_extra": $("#text-id_extra").val(),
"user_comment": $("#text-user_comment").val()
},