diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 0449f91046..98ff13c585 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2013-06-24 Miguel de Dios + + * include/functions_visual_map.php, + include/ajax/visual_console_builder.ajax.php: fixed the color of + lines in the editor. + + MERGED FROM THE BRANCH PANDORA_4.0 + 2013-06-24 Miguel de Dios * godmode/reporting/visual_console_builder.editor.js, diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index 7664e8f1ef..927c660d95 100644 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -272,9 +272,10 @@ switch ($action) { case 'get_color_line': $layoutData = db_get_row_filter('tlayout_data', array('id' => $id_element)); + $parent = db_get_row_filter('tlayout_data', array('id' => $layoutData['parent_item'])); $return = array(); - $return['color_line'] = visual_map_get_color_line_status($layoutData); + $return['color_line'] = visual_map_get_color_line_status($parent); echo json_encode($return); break; diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index fb91864a24..bf4de642fd 100644 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -268,9 +268,11 @@ function visual_map_print_item($layoutData) { //Add the line between elements. if ($layoutData['parent_item'] != 0) { + $parent = db_get_row_filter('tlayout_data', array('id' => $layoutData['parent_item'])); + echo ''; } @@ -1077,6 +1079,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line echo ''; } } + $img_style = array (); $img_style["title"] = $layout_data["label"]; @@ -1087,17 +1090,17 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line $img_style["height"] = $layout_data["height"]; } - $img = "images/console/icons/" . $layout_data["image"]; + $img = "images/console/icons/" . $layout_data["image"]; switch ($status) { case VISUAL_MAP_STATUS_CRITICAL_BAD: $img .= "_bad.png"; break; case VISUAL_MAP_STATUS_CRITICAL_ALERT: - $img = "4".$img."_bad.png"; + $img = "4" . $img . "_bad.png"; break; case VISUAL_MAP_STATUS_WARNING_ALERT: - $img = "4".$img."_warning.png"; + $img = "4" . $img . "_warning.png"; break; case VISUAL_MAP_STATUS_NORMAL: $img .= "_ok.png"; @@ -1756,6 +1759,7 @@ function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter return $retval; } + /** * Get the status of a layout. *