mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #968 from f0o/graph-defaults
Define some sane defaults for graphs
This commit is contained in:
@ -7,16 +7,14 @@ if($config['trim_tobias']) { $width+=12; }
|
||||
if ($_GET['height']) { $height = mres($_GET['height']); }
|
||||
if ($_GET['inverse']) { $in = 'out'; $out = 'in'; $inverse=TRUE; } else { $in = 'in'; $out = 'out'; }
|
||||
if ($_GET['legend'] == "no") { $rrd_options .= " -g"; }
|
||||
if (empty($_GET['nototal'])) { $nototal=TRUE; } else { $nototal=FALSE; }
|
||||
if (empty($_GET['nodetails'])) { $nodetails=TRUE; } else { $nodetails=FALSE; }
|
||||
if (empty($_GET['noagg'])) { $noagg=TRUE; } else { $noagg=FALSE; }
|
||||
|
||||
if (isset($_GET['nototal'])) { $nototal = ((bool) $_GET['nototal']); } else { $nototal=true; }
|
||||
if (isset($_GET['nodetails'])) { $nodetails = ((bool) $_GET['nodetails']); } else { $nodetails=false; }
|
||||
if (isset($_GET['noagg'])) { $noagg = ((bool) $_GET['noagg']); } else { $noagg=true; }
|
||||
if ($_GET['title'] == "yes") { $rrd_options .= " --title='".$graph_title."' "; }
|
||||
if (isset($_GET['graph_title'])) { $rrd_options .= " --title='".$_GET['graph_title']."' "; }
|
||||
|
||||
if (!isset($scale_min) && !isset($scale_max)) { $rrd_options .= " --alt-autoscale-max"; }
|
||||
if (!isset($scale_min) && !isset($scale_max) && !isset($norigid)) { $rrd_options .= " --rigid"; }
|
||||
|
||||
if (isset($scale_min)) { $rrd_options .= " -l $scale_min"; }
|
||||
if (isset($scale_max)) { $rrd_options .= " -u $scale_max"; }
|
||||
if (isset($scale_rigid)) { $rrd_options .= " -r"; }
|
||||
@ -34,5 +32,3 @@ if ($width <= "300") { $rrd_options .= " --font LEGEND:7:" . $config['mono_font'
|
||||
else { $rrd_options .= " --font LEGEND:8:" . $config['mono_font'] . " --font AXIS:7:" . $config['mono_font']; }
|
||||
|
||||
$rrd_options .= " --font-render-mode normal";
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user