diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 44a19733b5..a3ee5ef2f9 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,7 @@ +2012-02-16 Vanessa Gil + * operation/events/events_list: Changed extended info + to event list. + 2012-02-16 Juan Manuel Ramon * extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index d7811161b7..fb20847edf 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -745,7 +745,8 @@ foreach ($result as $event) { } if (in_array('id_agentmodule',$show_fields)) { - $data[$i] = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $event["id_agentmodule"]); + $data[$i] = '' + .db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $event["id_agentmodule"]).''; $i++; } @@ -758,7 +759,7 @@ foreach ($result as $event) { WHERE id = ' . $event["id_alert_am"] . ');'; $templateName = db_get_sql($sql); - $data[$i] = $templateName; + $data[$i] = ''.$templateName.''; } else { $data[$i] = ''; } @@ -771,13 +772,29 @@ foreach ($result as $event) { } if (in_array('user_comment',$show_fields)) { - $data[$i] = $event["user_comment"]; + $data[$i] = ui_print_truncate_text(strip_tags($event["user_comment"]), 30); $i++; } if (in_array('tags',$show_fields)) { - $data[$i] = $event["tags"]; - $i++; + if ($event["tags"] != '') { + $tag_array = explode(',', $event["tags"]); + $data[$i] = ''; + foreach ($tag_array as $tag_element){ + $blank_char_pos = strpos($tag_element, ' '); + $tag_name = substr($tag_element, 0, $blank_char_pos); + $tag_url = substr($tag_element, $blank_char_pos + 1); + $data[$i] .= ' ' .$tag_name; + if (!empty($tag_url)){ + $data[$i] .= ' ' . html_print_image('images/lupa.png', true, array('title' => __('Click here to open a popup window with URL tag'))) . ' '; + } + $data[$i] .= ','; + } + $data[$i] = rtrim($data[$i], ','); + } else { + $data[$i] = ''; + } + $i++; } if (in_array('source',$show_fields)) { @@ -915,7 +932,7 @@ foreach ($result as $event) { $string .= ''; $odd = 'rowOdd'; - + $string .= ''; $string .= '' . __('Agent name') . ''; if ($event["id_agente"] != 0) { @@ -924,7 +941,7 @@ foreach ($result as $event) { $string .= '- ' . __('Empty') . ' -'; } $string .= ''; - //$odd = 'rowOdd'; + $odd = ($odd == '')? 'rowOdd' : ''; if ($event["id_agentmodule"] != 0) { @@ -933,7 +950,7 @@ foreach ($result as $event) { $string .= ''; $string .= db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $event["id_agentmodule"]); $string .= ''; - //$odd = ''; + $odd = ($odd == '')? 'rowOdd' : ''; // Module group $string .= ''; @@ -943,7 +960,7 @@ foreach ($result as $event) { $string .= ''; $string .= $module_group; $string .= ''; - //$odd = 'rowOdd'; + $odd = ($odd == '')? 'rowOdd' : ''; } else { $string .= ''; @@ -984,7 +1001,7 @@ foreach ($result as $event) { $string .= $templateName; $string .= ''; - //$odd = ''; + $odd = ($odd == '')? 'rowOdd' : ''; } else { @@ -999,30 +1016,20 @@ foreach ($result as $event) { $string .= groups_get_name ($event["id_grupo"]); $string .= ''; $odd = ($odd == '')? 'rowOdd' : ''; - $string .= ''; - if ($group_rep == 0) { - $string .= '' . __('User ID') . ''; - } else { + + if ($group_rep != 0) { + $string .= ''; $string .= '' . __('Count') . ''; } if ($group_rep == 1) { $string .= $event["event_rep"]; + $string .= ''; + $odd = ($odd == '')? 'rowOdd' : ''; } - else { - if (!empty ($event["estado"])) { - if ($event["id_usuario"] != '0' && $event["id_usuario"] != '' && $event["id_usuario"] != 'system' && $event["id_usuario"] != "System"){ - $string .= ''.mb_substr ($event["id_usuario"],0,8).''; - } - else { - $string .= __('System'); - } - } - else { - $string .= '- ' . __('Empty') . ' -'; - } - } + $string .= ''; + $odd = ($odd == '')? 'rowOdd' : ''; $string .= '' . '' . __('Comments') . ''; if($event["user_comment"] != '') { $string .= $event["user_comment"]; @@ -1060,6 +1067,7 @@ foreach ($result as $event) { $string .= '- ' . __('Empty') . ' -'; $odd = ($odd == '')? 'rowOdd' : ''; } + $string .= '' . '' . __('Extra id') . ''; if ($event["id_extra"] != '') { $string .= $event["id_extra"]; @@ -1069,7 +1077,6 @@ foreach ($result as $event) { $string .= '- ' . __('Empty') . ' -'; } $string .= ''; - $odd = ($odd == '')? 'rowOdd' : ''; $string .= '' . '' . __('User name') . ''; if (($event["id_usuario"]!= '') || ($event["id_usuario"]!= 0)){