Added option to allow absolute dimensions on graphs

This commit is contained in:
Daniel Preussker
2015-09-06 10:59:44 +01:00
parent 63ed6e25aa
commit f081706ab1
2 changed files with 6 additions and 2 deletions

View File

@ -181,8 +181,8 @@ function get_percentage_colours($percentage) {
}//end get_percentage_colours()
function generate_minigraph_image($device, $start, $end, $type, $legend='no', $width=275, $height=100, $sep='&', $class='minigraph-image') {
return '<img class="'.$class.'" src="graph.php?'.implode($sep, array('device='.$device['device_id'], "from=$start", "to=$end", "width=$width", "height=$height", "type=$type", "legend=$legend")).'">';
function generate_minigraph_image($device, $start, $end, $type, $legend='no', $width=275, $height=100, $sep='&amp;', $class='minigraph-image',$absolute_size=0) {
return '<img class="'.$class.'" src="graph.php?'.implode($sep, array('device='.$device['device_id'], "from=$start", "to=$end", "width=$width", "height=$height", "type=$type", "legend=$legend", "absolute=$absolute_size")).'">';
}//end generate_minigraph_image()

View File

@ -103,3 +103,7 @@ else {
}
$rrd_options .= ' --font-render-mode normal';
if (isset($_GET['absolute']) && $_GET['absolute'] == "1") {
$rrd_options .= ' --full-size-mode';
}