diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a666f4521e..544730ae6c 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2011-02-16 Miguel de Dios <miguel.dedios@artica.es> + + * include/functions_visual_map.php: added links to services in the items in + the view of visualmap. + 2011-02-16 Miguel de Dios <miguel.dedios@artica.es> * include/ajax/visual_console_builder.ajax.php: fixed other safe_ouput in diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index d2a848d3f8..be5fc5be89 100644 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -514,8 +514,25 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines = if ($show_links) { if (($id_agent > 0) && ($layout_data['id_layout_linked'] == "" || $layout_data['id_layout_linked'] == 0)) { - // Link to an agent - echo '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agent.'">'; + //Extract id service if it is a prediction module. + $id_service = get_db_value_filter('custom_integer_1', + 'tagente_modulo', + array('id_agente_modulo' => $layout_data['id_agente_modulo'], + 'prediction_module' => 1)); + + if ($id_service === false) { + $id_service = 0; + } + + if ($id_service != 0) { + //Link to an service page + echo '<a href="index.php?sec=services&sec2=enterprise/operation/services/services&id_service=' . + $id_service . '&offset=0">'; + } + else { + // Link to an agent + echo '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agent.'">'; + } } elseif ($layout_data['id_layout_linked'] > 0) { // Link to a map