fixed error size graph in dashboard

This commit is contained in:
daniel 2018-09-11 11:37:11 +02:00
parent 995bd42d70
commit 7eed209339
2 changed files with 5 additions and 2 deletions

View File

@ -1673,7 +1673,9 @@ function pandoraFlotArea( graph_id, values, legend,
// Re-calculate the graph height with the legend height
if (dashboard || vconsole) {
var hDiff = $('#'+graph_id).height() - $('#legend_'+graph_id).height();
$acum = 0;
if(dashboard) $acum = 35;
var hDiff = $('#'+graph_id).height() - $('#legend_'+graph_id).height() - $acum;
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ){
}
else {

View File

@ -132,9 +132,10 @@ function flot_area_graph (
$params['grid_color'] = '#C1C1C1';
break;
}
$padding_vconsole = $params['dashboard'] ? 'padding: 1px 0px 10px 10px;' : '';
// Parent layer
$return = "<div class='parent_graph' style='width: " . ($params['width']) . ";" . $background_style . "'>";
$return = "<div class='parent_graph' style='width: " . ($params['width']) . ";" . $background_style . $padding_vconsole . "'>";
// Set some containers to legend, graph, timestamp tooltip, etc.
if($params['show_legend']){
$return .= "<p id='legend_$graph_id' style='text-align:left;'></p>";