diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php
index 4c1e7d5f97..a634284b4f 100644
--- a/pandora_console/include/functions_visual_map.php
+++ b/pandora_console/include/functions_visual_map.php
@@ -97,7 +97,7 @@ function visual_map_print_item($layoutData) {
break;
}
- switch ($type) {
+ switch($type) {
case STATIC_GRAPH:
if ($layoutData['image'] != null) {
$img = visual_map_get_image_status_element($layoutData,
@@ -112,18 +112,6 @@ function visual_map_print_item($layoutData) {
$sizeStyle = 'width: ' . $width . 'px; height: ' . $height . 'px;';
$imageSize = 'width="' . $width . '" height="' . $height . '"';
}
- echo '
';
- if ($layoutData['image'] != null) {
- if (($width != 0) && ($height != 0))
- echo html_print_image($img, true,
- array("class" => "image", "id" => "image_" . $id, "width" => "$width", "height" => "$height", "style" => $borderStyle));
- else
- echo html_print_image($img, true,
- array("class" => "image", "id" => "image_" . $id, "style" => $borderStyle));
- echo '
';
- }
- echo io_safe_output($text);
- echo "
";
break;
case GROUP_ITEM:
@@ -140,18 +128,7 @@ function visual_map_print_item($layoutData) {
$sizeStyle = 'width: ' . $width . 'px; height: ' . $height . 'px;';
$imageSize = 'width="' . $width . '" height="' . $height . '"';
}
- echo '';
- if ($layoutData['image'] != null) {
- if (($width != 0) && ($height != 0))
- echo html_print_image($img, true, array("class" => "image", "id" => "image_" . $id, "width" => "$width", "height" => "$height", "style" => $borderStyle));
- else
- echo html_print_image($img, true, array("class" => "image", "id" => "image_" . $id, "style" => $borderStyle));
- echo '
';
- }
- echo io_safe_output($text);
- echo "
";
break;
-
case PERCENTILE_BAR:
case PERCENTILE_BUBBLE:
//Metaconsole db connection
@@ -191,24 +168,7 @@ function visual_map_print_item($layoutData) {
$percentile = format_numeric($module_value / $max_percentile * 100, 0);
else
$percentile = 100;
-
- echo '';
- echo io_safe_output($text) . '
';
-
- ob_start();
- if ($type == PERCENTILE_BUBBLE) {
- echo progress_bubble($percentile, $width, $width, '', 1, $value_text, $colorStatus);
- }
- else {
- echo progress_bar($percentile, $width, 15, '', 1, $value_text, $colorStatus);
- }
- $img = ob_get_clean();
- $img = str_replace('>', 'class="image" id="image_' . $id . '" />', $img);
- echo $img;
- echo '
';
-
break;
-
case MODULE_GRAPH:
//Metaconsole db connection
if ($layoutData['id_metaconsole'] != 0) {
@@ -237,7 +197,70 @@ function visual_map_print_item($layoutData) {
}
$img = str_replace('>', 'class="image" id="image_' . $id . '" />', $img);
+ 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 . '"';
+ }
+ break;
+ }
+
+
+ switch ($type) {
+ case STATIC_GRAPH:
+ echo '';
+ if ($layoutData['image'] != null) {
+ if (($width != 0) && ($height != 0))
+ echo html_print_image($img, true,
+ array("class" => "image", "id" => "image_" . $id, "width" => "$width", "height" => "$height", "style" => $borderStyle));
+ else
+ echo html_print_image($img, true,
+ array("class" => "image", "id" => "image_" . $id, "style" => $borderStyle));
+ echo '
';
+ }
+ echo io_safe_output($text);
+ echo "
";
+ break;
+
+ case GROUP_ITEM:
+ echo '';
+ if ($layoutData['image'] != null) {
+ if (($width != 0) && ($height != 0))
+ echo html_print_image($img, true, array("class" => "image", "id" => "image_" . $id, "width" => "$width", "height" => "$height", "style" => $borderStyle));
+ else
+ echo html_print_image($img, true, array("class" => "image", "id" => "image_" . $id, "style" => $borderStyle));
+ echo '
';
+ }
+ echo io_safe_output($text);
+ echo "
";
+ break;
+
+ case PERCENTILE_BAR:
+ case PERCENTILE_BUBBLE:
+ echo '';
+ echo io_safe_output($text) . '
';
+
+ ob_start();
+ if ($type == PERCENTILE_BUBBLE) {
+ echo progress_bubble($percentile, $width, $width, '', 1, $value_text, $colorStatus);
+ }
+ else {
+ echo progress_bar($percentile, $width, 15, '', 1, $value_text, $colorStatus);
+ }
+ $img = ob_get_clean();
+ $img = str_replace('>', 'class="image" id="image_' . $id . '" />', $img);
+ echo $img;
+ echo '
';
+
+ break;
+
+ case MODULE_GRAPH:
echo '';
echo io_safe_output($text) . '
';
echo $img;
@@ -247,8 +270,8 @@ function visual_map_print_item($layoutData) {
case SIMPLE_VALUE_MAX:
case SIMPLE_VALUE_MIN:
case SIMPLE_VALUE_AVG:
- $io_safe_output_text = io_safe_output($text);
echo '
';
+ $io_safe_output_text = io_safe_output($text);
echo $io_safe_output_text;
//Metaconsole db connection
@@ -295,15 +318,6 @@ function visual_map_print_item($layoutData) {
echo "
";
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 . '"';
- }
echo '
';
if ($layoutData['image'] != null) {
// If match with protocol://direction