diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php old mode 100644 new mode 100755 index a634284b4f..14ea0b659b --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -70,8 +70,13 @@ function visual_map_print_item($layoutData) { $text = '' . $label . ''; + if (!isset($layoutData['status_calculated'])) { + $layoutData['status_calculated'] = + visual_map_get_status_element($layoutData); + } $status = $layoutData['status_calculated']; + switch ($status) { case VISUAL_MAP_STATUS_CRITICAL_BAD: //Critical (BAD) @@ -99,6 +104,7 @@ function visual_map_print_item($layoutData) { switch($type) { case STATIC_GRAPH: + case GROUP_ITEM: if ($layoutData['image'] != null) { $img = visual_map_get_image_status_element($layoutData, $layoutData['status_calculated']); @@ -113,15 +119,10 @@ function visual_map_print_item($layoutData) { $imageSize = 'width="' . $width . '" height="' . $height . '"'; } break; - - case GROUP_ITEM: + case ICON: if ($layoutData['image'] != null) { $img = visual_map_get_image_status_element($layoutData, $layoutData['status_calculated']); - if (substr($img,0,1) == '4') { - $borderStyle ='border: 2px solid ' . COL_ALERTFIRED . ';'; - $img = substr_replace($img, '', 0,1); - } } if (($width != 0) && ($height != 0)) { @@ -198,38 +199,53 @@ function visual_map_print_item($layoutData) { $img = str_replace('>', 'class="image" id="image_' . $id . '" />', $img); break; + } + + + $class = "item "; + switch ($type) { + case STATIC_GRAPH: + $class .= "static_graph"; + break; + case GROUP_ITEM: + $class .= "group_item"; + break; + case PERCENTILE_BAR: + case PERCENTILE_BUBBLE: + $class .= "percentile_item"; + break; + case MODULE_GRAPH: + $class .= "module_graph"; + break; + case SIMPLE_VALUE: + case SIMPLE_VALUE_MAX: + case SIMPLE_VALUE_MIN: + case SIMPLE_VALUE_AVG: + $class .= "simple_value"; + break; + case LABEL: + $class .= "label"; + break; case ICON: - if ($layoutData['image'] != null) { - $img = visual_map_get_image_status_element($layoutData, - $layoutData['status_calculated']); - } - - if (($width != 0) && ($height != 0)) { - $sizeStyle = 'width: ' . $width . 'px; height: ' . $height . 'px;'; - $imageSize = 'width="' . $width . '" height="' . $height . '"'; - } + $class .= "icon"; + break; + default: + //enterprise_hook break; } + echo '