mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
Revert "Fixed problems with backgrounds when add visual console in dashboards. Gitlab: #533"
This reverts commit 4563ef34a4da63e4907851d9dda1d0d565586b3a.
This commit is contained in:
parent
994432c335
commit
7a7a42b04e
@ -2434,9 +2434,12 @@ function visual_map_print_visual_map ($id_layout, $show_links = true,
|
|||||||
$proportion_height = 0;
|
$proportion_height = 0;
|
||||||
$proportion_width = 0;
|
$proportion_width = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!is_null($height) && !is_null($width)) {
|
if (!is_null($height) && !is_null($width)) {
|
||||||
$resizedMap = true;
|
$resizedMap = true;
|
||||||
|
|
||||||
|
|
||||||
if ($keep_aspect_ratio) {
|
if ($keep_aspect_ratio) {
|
||||||
$ratio = min($width / $layout['width'], $height / $layout['height']);
|
$ratio = min($width / $layout['width'], $height / $layout['height']);
|
||||||
$mapWidth = $ratio * $layout['width'];
|
$mapWidth = $ratio * $layout['width'];
|
||||||
@ -2450,10 +2453,11 @@ function visual_map_print_visual_map ($id_layout, $show_links = true,
|
|||||||
$dif_height = $layout["height"] - $mapHeight;
|
$dif_height = $layout["height"] - $mapHeight;
|
||||||
$dif_width = $layout["width"] - $mapWidth;
|
$dif_width = $layout["width"] - $mapWidth;
|
||||||
|
|
||||||
|
|
||||||
$proportion_height = $mapHeight / $layout["height"];
|
$proportion_height = $mapHeight / $layout["height"];
|
||||||
$proportion_width = $mapWidth / $layout["width"];
|
$proportion_width = $mapWidth / $layout["width"];
|
||||||
|
|
||||||
if ($layout["background"] != 'None.png' ) {
|
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole()) {
|
||||||
$backgroundImage =
|
$backgroundImage =
|
||||||
'/include/Image/image_functions.php?getFile=1&thumb=1&thumb_size=' . $mapWidth . 'x' . $mapHeight . '&file=' .
|
'/include/Image/image_functions.php?getFile=1&thumb=1&thumb_size=' . $mapWidth . 'x' . $mapHeight . '&file=' .
|
||||||
@ -2467,12 +2471,9 @@ function visual_map_print_visual_map ($id_layout, $show_links = true,
|
|||||||
($layout["background"]);
|
($layout["background"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
$mapWidth = $layout["width"];
|
$mapWidth = $layout["width"];
|
||||||
$mapHeight = $layout["height"];
|
$mapHeight = $layout["height"];
|
||||||
$backgroundImage = '';
|
|
||||||
if ($layout["background"] != 'None.png' )
|
|
||||||
$backgroundImage = $metaconsole_hack . 'images/console/background/' .
|
$backgroundImage = $metaconsole_hack . 'images/console/background/' .
|
||||||
$layout["background"];
|
$layout["background"];
|
||||||
}
|
}
|
||||||
@ -2481,15 +2482,18 @@ function visual_map_print_visual_map ($id_layout, $show_links = true,
|
|||||||
echo "<div style='width: 100%; overflow:auto; margin: 0 auto; padding:5px;'>";
|
echo "<div style='width: 100%; overflow:auto; margin: 0 auto; padding:5px;'>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<div id="background_'.$id_layout.'"
|
echo '<div style="';
|
||||||
|
|
||||||
|
if(get_parameter('pure')==1){
|
||||||
|
echo 'width:100%;height:100%;position:absolute;';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo 'background-color:'.$layout["background_color"].';"><div id="background_'.$id_layout.'"
|
||||||
style="margin:0px auto;text-align:
|
style="margin:0px auto;text-align:
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
position:relative;
|
position:relative;
|
||||||
width:' . $mapWidth . 'px;
|
width:' . $mapWidth . 'px;
|
||||||
height:' . $mapHeight . 'px;
|
height:' . $mapHeight . 'px;">';
|
||||||
background-color:'.$layout["background_color"].';">';
|
|
||||||
|
|
||||||
if ($layout["background"] != 'None.png' )
|
|
||||||
echo "<img src='" .
|
echo "<img src='" .
|
||||||
ui_get_full_url($backgroundImage) . "' width='100%' height='100%' />";
|
ui_get_full_url($backgroundImage) . "' width='100%' height='100%' />";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user