mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
Starting to the fusion.
This commit is contained in:
parent
5cf7927240
commit
c6987bdc0d
@ -97,7 +97,7 @@ function visual_map_print_item($layoutData) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($type) {
|
switch($type) {
|
||||||
case STATIC_GRAPH:
|
case STATIC_GRAPH:
|
||||||
if ($layoutData['image'] != null) {
|
if ($layoutData['image'] != null) {
|
||||||
$img = visual_map_get_image_status_element($layoutData,
|
$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;';
|
$sizeStyle = 'width: ' . $width . 'px; height: ' . $height . 'px;';
|
||||||
$imageSize = 'width="' . $width . '" height="' . $height . '"';
|
$imageSize = 'width="' . $width . '" height="' . $height . '"';
|
||||||
}
|
}
|
||||||
echo '<div id="' . $id . '" class="item static_graph" style="z-index: 1; text-align: center; color: ' . $color . '; position: absolute; display: inline-block; ' . $sizeStyle . ' top: ' . $top . 'px; left: ' . $left . 'px;">';
|
|
||||||
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 '<br />';
|
|
||||||
}
|
|
||||||
echo io_safe_output($text);
|
|
||||||
echo "</div>";
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GROUP_ITEM:
|
case GROUP_ITEM:
|
||||||
@ -140,18 +128,7 @@ function visual_map_print_item($layoutData) {
|
|||||||
$sizeStyle = 'width: ' . $width . 'px; height: ' . $height . 'px;';
|
$sizeStyle = 'width: ' . $width . 'px; height: ' . $height . 'px;';
|
||||||
$imageSize = 'width="' . $width . '" height="' . $height . '"';
|
$imageSize = 'width="' . $width . '" height="' . $height . '"';
|
||||||
}
|
}
|
||||||
echo '<div id="' . $id . '" class="item group_item" style="z-index: 1; text-align: center; color: ' . $color . '; position: absolute; display: inline-block; ' . $sizeStyle . ' top: ' . $top . 'px; left: ' . $left . 'px;">';
|
|
||||||
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 '<br />';
|
|
||||||
}
|
|
||||||
echo io_safe_output($text);
|
|
||||||
echo "</div>";
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PERCENTILE_BAR:
|
case PERCENTILE_BAR:
|
||||||
case PERCENTILE_BUBBLE:
|
case PERCENTILE_BUBBLE:
|
||||||
//Metaconsole db connection
|
//Metaconsole db connection
|
||||||
@ -191,24 +168,7 @@ function visual_map_print_item($layoutData) {
|
|||||||
$percentile = format_numeric($module_value / $max_percentile * 100, 0);
|
$percentile = format_numeric($module_value / $max_percentile * 100, 0);
|
||||||
else
|
else
|
||||||
$percentile = 100;
|
$percentile = 100;
|
||||||
|
|
||||||
echo '<div id="' . $id . '" class="item percentile_item" style="z-index: 1; color: ' . $color . '; text-align: center; position: absolute; display: inline-block; ' . $sizeStyle . ' top: ' . $top . 'px; left: ' . $left . 'px;">';
|
|
||||||
echo io_safe_output($text) . '<br />';
|
|
||||||
|
|
||||||
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 '</div>';
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MODULE_GRAPH:
|
case MODULE_GRAPH:
|
||||||
//Metaconsole db connection
|
//Metaconsole db connection
|
||||||
if ($layoutData['id_metaconsole'] != 0) {
|
if ($layoutData['id_metaconsole'] != 0) {
|
||||||
@ -237,7 +197,70 @@ function visual_map_print_item($layoutData) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$img = str_replace('>', 'class="image" id="image_' . $id . '" />', $img);
|
$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 '<div id="' . $id . '" class="item static_graph" style="z-index: 1; text-align: center; color: ' . $color . '; position: absolute; display: inline-block; ' . $sizeStyle . ' top: ' . $top . 'px; left: ' . $left . 'px;">';
|
||||||
|
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 '<br />';
|
||||||
|
}
|
||||||
|
echo io_safe_output($text);
|
||||||
|
echo "</div>";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GROUP_ITEM:
|
||||||
|
echo '<div id="' . $id . '" class="item group_item" style="z-index: 1; text-align: center; color: ' . $color . '; position: absolute; display: inline-block; ' . $sizeStyle . ' top: ' . $top . 'px; left: ' . $left . 'px;">';
|
||||||
|
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 '<br />';
|
||||||
|
}
|
||||||
|
echo io_safe_output($text);
|
||||||
|
echo "</div>";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PERCENTILE_BAR:
|
||||||
|
case PERCENTILE_BUBBLE:
|
||||||
|
echo '<div id="' . $id . '" class="item percentile_item" style="z-index: 1; color: ' . $color . '; text-align: center; position: absolute; display: inline-block; ' . $sizeStyle . ' top: ' . $top . 'px; left: ' . $left . 'px;">';
|
||||||
|
echo io_safe_output($text) . '<br />';
|
||||||
|
|
||||||
|
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 '</div>';
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MODULE_GRAPH:
|
||||||
echo '<div id="' . $id . '" class="item module_graph" style="z-index: 1; color: ' . $color . '; text-align: center; position: absolute; display: inline-block; ' . $sizeStyle . ' top: ' . $top . 'px; left: ' . $left . 'px;">';
|
echo '<div id="' . $id . '" class="item module_graph" style="z-index: 1; color: ' . $color . '; text-align: center; position: absolute; display: inline-block; ' . $sizeStyle . ' top: ' . $top . 'px; left: ' . $left . 'px;">';
|
||||||
echo io_safe_output($text) . '<br />';
|
echo io_safe_output($text) . '<br />';
|
||||||
echo $img;
|
echo $img;
|
||||||
@ -247,8 +270,8 @@ function visual_map_print_item($layoutData) {
|
|||||||
case SIMPLE_VALUE_MAX:
|
case SIMPLE_VALUE_MAX:
|
||||||
case SIMPLE_VALUE_MIN:
|
case SIMPLE_VALUE_MIN:
|
||||||
case SIMPLE_VALUE_AVG:
|
case SIMPLE_VALUE_AVG:
|
||||||
$io_safe_output_text = io_safe_output($text);
|
|
||||||
echo '<div id="' . $id . '" class="item simple_value" style="z-index: 1; left: 0px; top: 0px; color: ' . $color . '; text-align: center; position: absolute; ' . $sizeStyle . ' top: ' . $top . 'px; left: ' . $left . 'px;">';
|
echo '<div id="' . $id . '" class="item simple_value" style="z-index: 1; left: 0px; top: 0px; color: ' . $color . '; text-align: center; position: absolute; ' . $sizeStyle . ' top: ' . $top . 'px; left: ' . $left . 'px;">';
|
||||||
|
$io_safe_output_text = io_safe_output($text);
|
||||||
echo $io_safe_output_text;
|
echo $io_safe_output_text;
|
||||||
|
|
||||||
//Metaconsole db connection
|
//Metaconsole db connection
|
||||||
@ -295,15 +318,6 @@ function visual_map_print_item($layoutData) {
|
|||||||
echo "</div>";
|
echo "</div>";
|
||||||
break;
|
break;
|
||||||
case ICON:
|
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 '<div id="' . $id . '" class="item icon" style="z-index: 1; left: 0px; top: 0px; text-align: center; color: ' . $color . '; position: absolute; display: inline-block; ' . $sizeStyle . ' top: ' . $top . 'px; left: ' . $left . 'px;">';
|
echo '<div id="' . $id . '" class="item icon" style="z-index: 1; left: 0px; top: 0px; text-align: center; color: ' . $color . '; position: absolute; display: inline-block; ' . $sizeStyle . ' top: ' . $top . 'px; left: ' . $left . 'px;">';
|
||||||
if ($layoutData['image'] != null) {
|
if ($layoutData['image'] != null) {
|
||||||
// If match with protocol://direction
|
// If match with protocol://direction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user