diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index 82df0cab67..36b1211d70 100755 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -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); diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 804fa7427f..ca14021b61 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -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 "
"; + 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 "
"; + } + 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 "
"; + } + break; case STATIC_GRAPH: case GROUP_ITEM: