mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Fixed gauge graphs in visual console. Ticket 4 (gitlab)
(cherry picked from commit 29dfd3df9b3ae25f835f61ef14a23d7c21ebc945)
This commit is contained in:
parent
b7bb1294aa
commit
b7681c23c8
@ -787,24 +787,31 @@ switch ($action) {
|
||||
break;
|
||||
case 'module_graph':
|
||||
$values['type'] = MODULE_GRAPH;
|
||||
|
||||
if ($values['id_custom_graph'] > 0 ) {
|
||||
$values['height'] = $height_module_graph;
|
||||
$values['width'] = $width_module_graph;
|
||||
|
||||
$graph_conf = db_get_row('tgraph', 'id_graph', $values['id_custom_graph']);
|
||||
|
||||
$graph_stacked = $graph_conf['stacked'];
|
||||
if ( $graph_stacked == CUSTOM_GRAPH_BULLET_CHART) {
|
||||
$values['height'] = 50;
|
||||
}
|
||||
elseif ($graph_stacked == CUSTOM_GRAPH_GAUGE ){
|
||||
if ( $height_module_graph < 150 )
|
||||
if ( $height_module_graph < 150 ) {
|
||||
$values['height'] = 150;
|
||||
elseif( $height_module_graph >= 150 && $height_module_graph < 250 )
|
||||
$values['height'] = $graph_height;
|
||||
elseif( $height_module_graph >= 250 )
|
||||
$values['height'] = 200;
|
||||
}
|
||||
elseif(($height_module_graph >= 150)
|
||||
&& ($height_module_graph < 250)) {
|
||||
$values['height'] = $graph_conf['height'];
|
||||
}
|
||||
elseif( $height_module_graph >= 250 ) {
|
||||
$values['height'] = 200;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$values['height'] = $height_module_graph;
|
||||
$values['width'] = $width_module_graph;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user