diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4da8ee179a..e8eae86708 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2013-02-28 Sergio Martin + + * include/javascript/pandora_events.js + operation/events/events_list.php: Remodelated the filter + save/update feature from the filter form. To new modal + windows system + 2013-02-28 Miguel de Dios * godmode/agentes/configurar_agente.php: fixed, now show again diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index d71de0cb45..8078641e43 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -77,6 +77,41 @@ function show_event_dialog(event_id, group_rep, dialog_page, result) { return false; } +function show_save_filter_dialog() { + $('input:radio[name="filter_mode"]').filter('[value="new"]').trigger('click'); + $("#save_filter_layer").dialog ({ + title: $('#save_filter_text').html(), + resizable: true, + draggable: true, + modal: true, + overlay: { + opacity: 0.5, + background: "black" + }, + width: 420, + height: 200 + }) + .show (); + return false; +} + +function show_load_filter_dialog() { + $("#load_filter_layer").dialog ({ + title: $('#load_filter_text').html(), + resizable: true, + draggable: true, + modal: true, + overlay: { + opacity: 0.5, + background: "black" + }, + width: 420, + height: 200 + }) + .show (); + return false; +} + // Check the response type and open it in a modal dialog or new window function execute_response(event_id, server_id) { var response_id = $('#select_custom_response option:selected').val(); diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index 043fb3fc09..ff0b7c8a50 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -87,7 +87,6 @@ if (is_ajax()) { if ($update_event_filter) { $values = array(); $id = get_parameter('id'); - $values['id_name'] = get_parameter('id_name'); $values['id_group'] = get_parameter('id_group'); $values['event_type'] = get_parameter('event_type'); $values['severity'] = get_parameter('severity'); @@ -146,6 +145,8 @@ require('events.build_query.php'); // Now $sql_post have all the where condition ///////////////////////////////////////////// +$id_name = get_parameter('id_name', ''); + echo "
"; //Link to toggle filter if (!empty($id_name)) { @@ -155,48 +156,82 @@ else{ echo ''.__('Event control filter').' '.html_print_image ("images/down.png", true, array ("title" => __('Toggle filter(s)'), "id" => 'toggle_arrow')).'

'; } -//Start div -echo '