Fixed bug that did not create boxes in visual console. Ticket #2744

This commit is contained in:
Arturo Gonzalez Diaz 2015-09-23 16:52:13 +02:00
parent 9f1a301109
commit 0ffc7eab6c
2 changed files with 25 additions and 12 deletions

View File

@ -95,7 +95,7 @@ $left = get_parameter('left', null);
$top = get_parameter('top', null);
$agent = get_parameter('agent', null);
$id_module = get_parameter('module', null);
$period = get_parameter('period', null);
$period = (int)get_parameter('period', null);
$width = get_parameter('width', null);
$height = get_parameter('height', null);
$parent = get_parameter('parent', null);
@ -115,11 +115,11 @@ $id_agent = get_parameter('id_agent', null);
$id_metaconsole = get_parameter('id_metaconsole', null);
$id_group = (int)get_parameter('id_group', 0);
$id_custom_graph = get_parameter('id_custom_graph', null);
$border_width = get_parameter('border_width', 0);
$border_width = (int)get_parameter('border_width', 0);
$border_color = get_parameter('border_color', '');
$fill_color = get_parameter('fill_color', '');
$width_box = get_parameter('width_box', 0);
$height_box = get_parameter('height_box', 0);
$width_box = (int)get_parameter('width_box', 0);
$height_box = (int)get_parameter('height_box', 0);
$line_start_x = (int)get_parameter('line_start_x', 0);
$line_start_y = (int)get_parameter('line_start_y', 0);
$line_end_x = (int)get_parameter('line_end_x', 0);

View File

@ -795,14 +795,27 @@ function visual_map_print_item($mode = "read", $layoutData,
switch ($type) {
case BOX_ITEM:
$style = "";
$style .= "width: " . ($width * $proportion['proportion_width']) . "px; ";
$style .= "height: " . ($height * $proportion['proportion_height']) . "px; ";
$style .= "border-style: solid; ";
$style .= "border-width: " . $border_width . "px; ";
$style .= "border-color: " . $border_color . "; ";
$style .= "background-color: " . $fill_color . "; ";
echo "<div style='" . $style . "'></div>";
if (!empty($proportion)){
$style = "";
$style .= "width: " . ($width * $proportion['proportion_width']) . "px; ";
$style .= "height: " . ($height * $proportion['proportion_height']) . "px; ";
$style .= "border-style: solid; ";
$style .= "border-width: " . $border_width . "px; ";
$style .= "border-color: " . $border_color . "; ";
$style .= "background-color: " . $fill_color . "; ";
echo "<div style='" . $style . "'></div>";
}
else{
$style = "";
$style .= "width: " . $width . "px; ";
$style .= "height: " . $height . "px; ";
$style .= "border-style: solid; ";
$style .= "border-width: " . $border_width . "px; ";
$style .= "border-color: " . $border_color . "; ";
$style .= "background-color: " . $fill_color . "; ";
echo "<div style='" . $style . "'></div>";
}
break;
case STATIC_GRAPH:
case GROUP_ITEM: