diff --git a/pandora_console/extras/mr/20.sql b/pandora_console/extras/mr/20.sql index a78963b813..e99b2911d7 100644 --- a/pandora_console/extras/mr/20.sql +++ b/pandora_console/extras/mr/20.sql @@ -1 +1,9 @@ -ALTER TABLE treport_content ADD COLUMN `recursion` TINYINT(1) default NULL; \ No newline at end of file +START TRANSACTION; + +ALTER TABLE treport_content ADD COLUMN `recursion` TINYINT(1) default NULL; + +ALTER TABLE tevent_filter ADD COLUMN `user_comment` text NOT NULL; +ALTER TABLE tevent_filter ADD COLUMN `source` tinytext NOT NULL; +ALTER TABLE tevent_filter ADD COLUMN `id_extra` tinytext NOT NULL; + +COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index a472b8b6dd..7ee1968c4c 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1213,6 +1213,9 @@ UPDATE `tlink` SET `link` = 'https://github.com/pandorafms/pandorafms/issues' WH -- --------------------------------------------------------------------- ALTER TABLE tevent_filter ADD COLUMN `date_from` date DEFAULT NULL; ALTER TABLE tevent_filter ADD COLUMN `date_to` date DEFAULT NULL; +ALTER TABLE tevent_filter ADD COLUMN `user_comment` text NOT NULL; +ALTER TABLE tevent_filter ADD COLUMN `source` tinytext NOT NULL; +ALTER TABLE tevent_filter ADD COLUMN `id_extra` tinytext NOT NULL; -- --------------------------------------------------------------------- -- Table `tusuario` -- --------------------------------------------------------------------- diff --git a/pandora_console/godmode/events/event_edit_filter.php b/pandora_console/godmode/events/event_edit_filter.php index 851e5b5e58..f83d19e14d 100644 --- a/pandora_console/godmode/events/event_edit_filter.php +++ b/pandora_console/godmode/events/event_edit_filter.php @@ -65,6 +65,9 @@ if ($id) { $group_rep = $filter['group_rep']; $date_from = str_replace("-","/",$filter['date_from']); $date_to = str_replace("-","/",$filter['date_to']); + $source = $filter['source']; + $id_extra = $filter['id_extra']; + $user_comment = $filter['user_comment']; $tag_with_json = $filter['tag_with']; $tag_with_json_clean = io_safe_output($tag_with_json); @@ -130,6 +133,9 @@ if ($update || $create) { $group_rep = get_parameter('group_rep', ''); $date_from = get_parameter('date_from', ''); $date_to = get_parameter('date_to', ''); + $source = get_parameter('source'); + $id_extra = get_parameter('id_extra'); + $user_comment = get_parameter('user_comment'); $tag_with_base64 = get_parameter('tag_with', json_encode(array())); $tag_with_json = io_safe_input(base64_decode($tag_with_base64)); @@ -158,6 +164,9 @@ if ($update || $create) { 'tag_without' => $tag_without_json, 'date_from' => $date_from, 'date_to' => $date_to, + 'source' => $source, + 'id_extra' => $id_extra, + 'user_comment' => $user_comment, 'filter_only_alert' => $filter_only_alert); } @@ -390,6 +399,16 @@ 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[23][0] = '' . __('Extra ID') . ''; +$table ->data[23][1] = html_print_input_text ('id_extra', $id_extra, '', 11, 255, true); + +$table ->data[24][0] = '' . __('Comment') . ''; +$table ->data[24][1] = html_print_input_text ('user_comment', $user_comment, '', 35, 255, true); + echo '