diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index cd0a391f12..a8d0014578 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2011-11-28 Juan Manuel Ramon + + * operation/events/events_list.php + operation/events/events.php: Added tag url popup, new style in + extended event table and new fields. + 2011-11-28 Sergio Martin * include/functions_config.php: Clean deprecated lock policies diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index d20c43a27b..4d031c5347 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -215,6 +215,11 @@ if ($config["pure"] == 0) { window.open(url, '','width=300, height=300, toolbar=no, location=no, directories=no, status=no, menubar=no'); } + + function openURLTagWindow(url) { + window.open(url, url,'width=300, height=300, toolbar=no, location=no, directories=no, status=no, menubar=no'); + } +  '; } else { - $data[4] .= html_print_image ("images/tick.png", true, - array ("title" => __('Event validated'))).' '; + /* $data[4] .= html_print_image ("images/tick.png", true, + array ("title" => __('Event validated'))).' '; */ + $data[4] .= '      '; } // Delete event if (check_acl ($config["id_user"], $event["id_grupo"], "IM") == 1) { @@ -556,13 +557,13 @@ foreach ($result as $event) { $table->colspan[$idx][0] = 10; $table->rowstyle[$idx] = 'display: none;'; array_push ($table->data, $data); - + //Hiden row with extended description - $string = ''; + $string = '
'; $string .= ''; + $string .= ''; $string .= ''; + $string .= ''; + $string .= ''; + $odd = ''; if ($event["id_agente"] != 0) { $string .= ''; + //$odd = 'rowOdd'; + $odd = ($odd == '')? 'rowOdd' : ''; } if ($event["id_agentmodule"] != 0) { $string .= ''; + $string .= ''; + //$odd = ''; + $odd = ($odd == '')? 'rowOdd' : ''; + // Module group + $string .= ''; + //$odd = 'rowOdd'; + $odd = ($odd == '')? 'rowOdd' : ''; } if ($event["id_alert_am"] != 0) { @@ -616,14 +645,17 @@ foreach ($result as $event) { $string .= $templateName; - $string .= ''; + $string .= ''; + //$odd = ''; + $odd = ($odd == '')? 'rowOdd' : ''; } $string .= ''; + $string .= ''; + $odd = ($odd == '')? 'rowOdd' : ''; $string .= ''; - $string .= ''; - $string .= '
'; $string .= '' . __('Event name') . ''; $string .= io_safe_output($event["evento"]); - $string .= '
'; $string .= '' . __('Severity') . ''; $string .= html_print_image ($img_sev, true, @@ -575,21 +576,49 @@ foreach ($result as $event) { $string .= ''; $string .= '' . __('Type') . ''; $string .= events_print_type_img ($event["event_type"], true).' '.events_print_type_description($event["event_type"], true); + $string .= '
'; + $string .= '' . __('Status') . ''; + $string .= $title_st; $string .= '
'; + $string .= '' . __('Timestamp') . ''; + if ($group_rep == 1) { + $string .= date ($config["date_format"], $event['timestamp_rep']); + } + else { + $string .= date ($config["date_format"], $event["timestamp"]); + } + $string .= '
'; $string .= '' . __('Agent name') . ''; $string .= ui_print_agent_name ($event["id_agente"], true); $string .= '
'; - $string .= '' . __('Agent module source') . ''; + $string .= '' . __('Agent module') . ''; $string .= ''; $string .= db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $event["id_agentmodule"]); - $string .= '
'; + $string .= '' . __('Module group') . ''; + $id_module_group = db_get_value('id_module_group', 'tagente_modulo', 'id_agente_modulo', $event["id_agentmodule"]); + $module_group = db_get_value('name', 'tmodule_group', 'id_mg', $id_module_group); + $string .= ''; + $string .= $module_group; + $string .= '
'; $string .= '' . __('Group') . ''; $string .= ui_print_group_icon ($event["id_grupo"], true); $string .= groups_get_name ($event["id_grupo"]); - $string .= '
'; if ($group_rep == 0) { $string .= '' . __('User ID') . ''; @@ -648,16 +680,32 @@ foreach ($result as $event) { } } $string .= '
' . '' . __('Comments') . ''; + $string .= '
' . '' . __('Comments') . ''; if($event["user_comment"] != '') { $string .= $event["user_comment"]; } else { $string .= '- ' . __('Empty') . ' -'; } $string .= '
' . '' . __('Tags') . ''; + $odd = ($odd == '')? 'rowOdd' : ''; + $string .= '
' . '' . __('Tags') . ''; if ($event["tags"] != '') { - $string .= $event["tags"]; + $tag_array = explode(',', $event["tags"]); + //html_debug_print($tag_array); + foreach ($tag_array as $tag_element){ + $blank_char_pos = strpos($tag_element, ' '); + //html_debug_print($blank_char_pos); + $tag_name = substr($tag_element, 0, $blank_char_pos); + $tag_url = substr($tag_element, $blank_char_pos + 1); + //html_debug_print("Tag name " . $tag_name); + //html_debug_print($tag_url); + $string .= ' ' .$tag_name; + if (!empty($tag_url)){ + $string .= ' ' . html_print_image('images/lupa.png', true, array('title' => __('Click here to open a popup window with URL tag'))) . ' '; + } + $string .= ','; + } + $string = rtrim($string, ','); } else { $string .= '- ' . __('Empty') . ' -';