From aa2eaa974686b6394f5fb085ff9fe8e55780d499 Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Thu, 7 Jul 2011 13:58:50 +0000 Subject: [PATCH] 2011-07-07 Juan Manuel Ramon * include/functions_visual_map.php: Added links to service items in visual console. Pending tasks: #3175079 * general/pandora_help.php: Changed color of the footer. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4526 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 9 +++ pandora_console/general/pandora_help.php | 2 +- .../include/functions_visual_map.php | 75 ++++++++++++++++++- 3 files changed, 82 insertions(+), 4 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a670b0389a..607d23ef51 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2011-07-07 Juan Manuel Ramon + + * include/functions_visual_map.php: Added links to service items + in visual console. + + Pending tasks: #3175079 + + * general/pandora_help.php: Changed color of the footer. + 2011-07-07 Ramon Novoa * include/functions_network_components.php, diff --git a/pandora_console/general/pandora_help.php b/pandora_console/general/pandora_help.php index 216b7f7c66..1559bcb91d 100644 --- a/pandora_console/general/pandora_help.php +++ b/pandora_console/general/pandora_help.php @@ -70,7 +70,7 @@ echo '
'; require_once ($help_file); echo '
'; echo '


'; -echo '
'; +echo '
'; include ('footer.php'); echo '
'; ?> diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 8e1d685555..0c864ab25b 100644 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -738,9 +738,35 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line echo '
'; else echo '
'; + + $endTagA = false; + + if ($show_links) { + //Extract id service if it is a prediction module. + $id_service = db_get_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 ''; + $endTagA = true; + } + } + echo ''.$layout_data['label']. ' '; echo db_get_value ('datos', 'tagente_estado', 'id_agente_modulo', $layout_data['id_agente_modulo']); - echo '
'; + echo ''; + + if ($endTagA) echo ''; + + echo '
'; break; case 3: // **************************************************************** @@ -756,7 +782,28 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line $percentile = $valor / $layout_data['height'] * 100; else $percentile = 100; + + $endTagA = false; + if ($show_links) { + //Extract id service if it is a prediction module. + $id_service = db_get_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 ''; + $endTagA = true; + } + } + echo $layout_data['label']; echo "
"; @@ -764,6 +811,9 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line echo progress_bar2($percentile, ((integer)($proportion * $width)), 15); else echo progress_bar2($percentile, $width, 15); + + if ($endTagA) echo '
'; + echo '
'; break; case 1; @@ -779,10 +829,29 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line echo $layout_data['label']; echo "
"; - + $endTagA = false; + if ($show_links) { if (($layout_data['id_layout_linked'] == "") || ($layout_data['id_layout_linked'] == 0)) { - echo ''; + + //Extract id service if it is a prediction module. + $id_service = db_get_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 ''; + } + else { + echo ''; + } } else { echo ''; }