diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 7603c92cbd..30042632b1 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-06-24 Miguel de Dios + + * include/functions_visual_map.php: added more changes for to make + more easy the merges from the branch. + 2013-06-24 Miguel de Dios * include/functions_visual_map.php: fixed the links of module diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 5efab4deaa..00399fdb2c 100644 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -70,6 +70,7 @@ function visual_map_print_item($layoutData) { $text = '' . $label . ''; $status = visual_map_get_status_element($layoutData); + switch ($status) { case VISUAL_MAP_STATUS_CRITICAL_BAD: //Critical (BAD) @@ -548,6 +549,7 @@ function visual_map_process_wizard_add_modules ($id_modules, $image, $id_layout, break; } + $values = array ('type' => $value_type, 'id_layout' => $id_layout, 'pos_x' => $pos_x, @@ -883,6 +885,11 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line $layout = db_get_row ('tlayout', 'id', $id_layout); + if (empty($layout)) { + ui_print_error_message(__('Cannot load the visualmap')); + return; + } + $resizedMap = false; $proportion = 1; if (!is_null($width)) { @@ -951,6 +958,8 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line // Get parent status (Could be an agent, module, map, // others doesnt have parent info) // ************************************************************* + + if ($layout_data["parent_item"] != 0) { $layout_data_parent = db_get_row_filter('tlayout_data', array('id' => $layout_data["parent_item"])); @@ -1212,7 +1221,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line if (!empty ($layout_data["width"])) { $img_style["width"] = $layout_data["width"]; - } + } if (!empty ($layout_data["height"])) { $img_style["height"] = $layout_data["height"]; } @@ -1300,8 +1309,10 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line $id_service . '&offset=0">'; $endTagA = true; } + } elseif ($layout_data['id_layout_linked'] > 0) { + // Link to a map if (empty($layout_data['id_metaconsole'])) { echo ''; @@ -1453,6 +1464,8 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line break; case PERCENTILE_BAR: case PERCENTILE_BUBBLE: + + if ($resizedMap) echo '"; + if (defined('METACONSOLE')) { echo ""; } + } +//End function + + +//Start function /** * Get a list with the layouts for a user. *