Setting font colors for RRD graphs is now possible (#10083)

* easily setting font colors for RRD graphs is now possible

* add a comment explaining the variable
This commit is contained in:
VVelox
2019-04-28 03:19:35 -05:00
committed by PipoCanaja
parent df2930b671
commit 7609253a13
4 changed files with 8 additions and 4 deletions

View File

@@ -224,8 +224,12 @@ $config['alerts']['port_util_perc'] = 85;
$config['uptime_warning'] = '84600';
// Time in seconds to display a "Device Rebooted" Alert. 0 to disable warnings.
// Cosmetics
$config['rrdgraph_def_text'] = '-c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c FONT#000000 -c CANVAS#FFFFFF00 -c GRID#a5a5a5';
$config['rrdgraph_def_text'] = '-c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c CANVAS#FFFFFF00 -c GRID#a5a5a5';
$config['rrdgraph_def_text'] .= ' -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal';
// This is largely for people who are using a dark CSS override system.
// For multi-user installs, likely best to leave it at the default or pick one that works nicely for both.
// If you want a color that works nice for both a dark or light BG, 0000FF seems to.
$config['rrdgraph_def_text_color'] = '000000';
$config['rrdgraph_real_percentile'] = false;
$config['percentile_value'] = 95;
// Set to TRUE if you want to display the 95% based on the highest value. (aka real 95%)

View File

@@ -80,7 +80,7 @@ if (isset($scale_rigid)) {
}
$rrd_options .= ' -E --start '.$from.' --end '.$to.' --width '.$width.' --height '.$height.' ';
$rrd_options .= $config['rrdgraph_def_text'];
$rrd_options .= $config['rrdgraph_def_text'].' -c FONT#'.$config['rrdgraph_def_text_color'];
if ($_GET['bg']) {
$rrd_options .= ' -c CANVAS#'.mres($_GET['bg']).' ';

View File

@@ -5,7 +5,7 @@ if ($_GET['legend']) {
}
$rrd_options = "--alt-autoscale-max -E --start $from --end ".($to - 150)." --width $width --height $height ";
$rrd_options .= $config['rrdgraph_def_text'];
$rrd_options .= $config['rrdgraph_def_text'].' -c FONT#'.$config['rrdgraph_def_text_color'];
if ($height < '99') {
$rrd_options .= ' --only-graph';
}

View File

@@ -5,7 +5,7 @@ if ($_GET['legend']) {
}
$rrd_options = " --alt-autoscale-max -E --start $from --end ".($to - 150)." --width $width --height $height ";
$rrd_options .= $config['rrdgraph_def_text'];
$rrd_options .= $config['rrdgraph_def_text'].' -c FONT#'.$config['rrdgraph_def_text_color'];
if ($height < '99') {
$rrd_options .= ' --only-graph';