diff --git a/includes/functions.php b/includes/functions.php index 4ad2ae502..cab44eb6c 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -376,8 +376,8 @@ function trafgraph ($rrd, $graph, $from, $to, $width, $height) "LINE1:d95thout#aa0000:" ); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -417,8 +417,8 @@ function pktsgraph ($rrd, $graph, $from, $to, $width, $height) { "GPRINT:out:LAST:%6.2lf%spps", "GPRINT:out:AVERAGE:%6.2lf%spps", "GPRINT:out:MAX:%6.2lf%spps\\n"); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -461,8 +461,8 @@ function errorgraph ($rrd, $graph, $from, $to, $width, $height) "GPRINT:out:AVERAGE:%6.2lf%spps", "GPRINT:out:MAX:%6.2lf%spps\\n", ); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -502,8 +502,8 @@ function nucastgraph ($rrd, $graph, $from, $to, $width, $height) "GPRINT:out:LAST:%6.2lf%spps", "GPRINT:out:AVERAGE:%6.2lf%spps", "GPRINT:out:MAX:%6.2lf%spps\\n"); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -542,8 +542,8 @@ function cpugraph ($rrd, $graph , $from, $to, $width, $height) "GPRINT:5m:MIN:Min\:%6.2lf", "GPRINT:5m:MAX:Max\:%6.2lf\\n"); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -579,8 +579,8 @@ function tempgraph ($rrd, $graph, $from, $to, $width, $height, $title, $vertical "GPRINT:out:MIN:Min\:%6.2lf", "GPRINT:out:MAX:Max\:%6.2lf\\n"); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -610,8 +610,8 @@ function uptimegraph ($rrd, $graph , $from, $to, $width, $height, $title, $verti "GPRINT:cuptime:LAST:Cur\:%6.2lf", "GPRINT:cuptime:AVERAGE:Avg\: %6.2lf", "GPRINT:cuptime:MAX:Max\:%6.2lf\\n"); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -651,8 +651,8 @@ function memgraph ($rrd, $graph , $from, $to, $width, $height, $title, $vertical LINE1.5:MEMTOTAL#cc0000:"; if($width <= "300") {$opts .= "\ - --font LEGEND:7:$installdir/DejaVuSansMono.ttf \ - --font AXIS:6:$installdir/DejaVuSansMono.ttf \ + --font LEGEND:7:$mono_font \ + --font AXIS:6:$mono_font \ --font-render-mode normal";} @@ -702,7 +702,7 @@ function ip_graph ($rrd, $graph, $from, $to, $width, $height) { "GPRINT:ipOutNoRoutes:AVERAGE: %6.2lf%s", "GPRINT:ipOutNoRoutes:MAX: %6.2lf%s\\n" ); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", "--font-render-mode", "normal");} + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); $ret = rrd_graph("$imgfile", $opts, count($opts)); if( !is_array($ret) ) { @@ -759,7 +759,7 @@ function icmp_graph ($rrd, $graph, $from, $to, $width, $height) { "GPRINT:icmpOutEchoReps:AVERAGE: %6.2lf%s", "GPRINT:icmpOutEchoReps:MAX: %6.2lf%s\\n" ); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", "--font-render-mode", "normal");} + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); $ret = rrd_graph("$imgfile", $opts, count($opts)); if( !is_array($ret) ) { @@ -811,7 +811,7 @@ function tcp_graph ($rrd, $graph, $from, $to, $width, $height) { "GPRINT:tcpRetransSegs:AVERAGE: %6.2lf%s", "GPRINT:tcpRetransSegs:MAX: %6.2lf%s\\n", ); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", "--font-render-mode", "normal");} + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); $ret = rrd_graph("$imgfile", $opts, count($opts)); if( !is_array($ret) ) { @@ -848,7 +848,7 @@ function udp_graph ($rrd, $graph, $from, $to, $width, $height) { "GPRINT:udpNoPorts:AVERAGE: %6.2lf%s", "GPRINT:udpNoPorts:MAX: %6.2lf%s\\n", ); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", "--font-render-mode", "normal");} + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); $ret = rrd_graph("$imgfile", $opts, count($opts)); if( !is_array($ret) ) { diff --git a/includes/graphing.php b/includes/graphing.php index 190ae4fcc..9d00fd116 100644 --- a/includes/graphing.php +++ b/includes/graphing.php @@ -26,8 +26,8 @@ function temp_graph ($device, $graph, $from, $to, $width, $height, $title, $vert $optsa[] = "GPRINT:temp$fs[temp_id]:MAX:%3.0lf°C\l"; $iter++; } - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); $ret = rrd_graph("$imgfile", $opts, count($opts)); diff --git a/includes/procurve-graphing.php b/includes/procurve-graphing.php index 948faeda1..6a983f71e 100755 --- a/includes/procurve-graphing.php +++ b/includes/procurve-graphing.php @@ -18,8 +18,8 @@ function cpugraphHP ($rrd, $graph , $from, $to, $width, $height) "GPRINT:load:MIN:Min\:%3.2lf", "GPRINT:load:MAX:Max\:%3.2lf\\n"); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -53,8 +53,8 @@ function memgraphHP ($rrd, $graph , $from, $to, $width, $height, $title, $vertic LINE1.5:TOTAL#cc0000:"; if($width <= "300") {$opts .= "\ - --font LEGEND:7:$installdir/DejaVuSansMono.ttf \ - --font AXIS:6:$installdir/DejaVuSansMono.ttf \ + --font LEGEND:7:$mono_font \ + --font AXIS:6:$mono_font \ --font-render-mode normal";} diff --git a/includes/unix-graphing.php b/includes/unix-graphing.php index 555badadc..0a238da58 100755 --- a/includes/unix-graphing.php +++ b/includes/unix-graphing.php @@ -61,8 +61,8 @@ function mailerrorgraphUnix ($rrd, $graph, $from, $to, $width, $height, $title, 'GPRINT:rspam:AVERAGE:avg\: %5.2lf/min', 'GPRINT:rmspam:MAX:max\: %3.0lf/min\l'); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -120,8 +120,8 @@ function mailsgraphUnix ($rrd, $graph, $from, $to, $width, $height, $title, $ver "GPRINT:rrecv:AVERAGE:Avg\: %4.2lf/min", "GPRINT:rmrecv:MAX:Max\: %3.0lf/min\l"); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -205,8 +205,8 @@ function memgraphUnix ($rrd, $graph, $from, $to, $width, $height, $title, $verti "LINE1:totalreal#050505:total", "GPRINT:totalreal:AVERAGE: %7.2lf %s"); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -257,8 +257,8 @@ function loadgraphUnix ($rrd, $graph, $from, $to, $width, $height, $title, $vert "GPRINT:c:AVERAGE: %7.2lf", "GPRINT:c:MAX: %7.2lf\\n"); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -297,8 +297,8 @@ function usersgraphUnix ($rrd, $graph, $from, $to, $width, $height, $title, $ver "GPRINT:users:AVERAGE:%6.2lf", "GPRINT:users:MIN:%6.2lf", "GPRINT:users:MAX:%6.2lf\\n"); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -335,8 +335,8 @@ function procsgraphUnix ($rrd, $graph, $from, $to, $width, $height, $title, $ver "GPRINT:procs:AVERAGE:%6.2lf", "GPRINT:procs:MIN:%6.2lf", "GPRINT:procs:MAX:%6.2lf\\n"); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -393,8 +393,8 @@ function cpugraphUnix ($rrd, $graph, $from, $to, $width, $height, $title, $verti "GPRINT:idle_perc:AVERAGE: Avg\:%3.0lf%%", "GPRINT:idle_perc:MAX: Max\:%3.0lf%%\\n"); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -459,8 +459,8 @@ function couriergraphUnix ($rrd, $graph, $from, $to, $width, $height, $title, $v 'GPRINT:vimapd_ssl_login:AVERAGE:tot\: %5.0lf', 'GPRINT:rimapd_ssl_login:AVERAGE:avg\: %4.0lf/min', 'GPRINT:rmimapd_ssl_login:MAX:max\: %4.0lf/min\l'); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -491,8 +491,8 @@ function apachehitsgraphUnix ($rrd, $graph, $from, $to, $width, $height, $title, "GPRINT:hits:LAST: %6.2lf/sec", "GPRINT:hits:AVERAGE:%6.2lf/sec", "GPRINT:hits:MAX:%6.2lf/sec\\n"); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -539,8 +539,8 @@ function unixfsgraph ($device, $graph, $from, $to, $width, $height, $title, $ver $optsa[] = "GPRINT:$fs[storage_id]p:LAST:%3.0lf%%\l"; $iter++; } - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); $ret = rrd_graph("$imgfile", $opts, count($opts)); @@ -569,8 +569,8 @@ function apachebitsgraphUnix ($rrd, $graph, $from, $to, $width, $height, $title, "GPRINT:bits:AVERAGE:%6.2lf%sbps", "GPRINT:bits:MAX:%6.2lf%sbps\\n"); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb); @@ -607,8 +607,8 @@ function tempgraphUnix ($rrd, $graph, $from, $to, $width, $height, $title, $vert "GPRINT:sys:MIN:Min\:%6.2lf", "GPRINT:sys:MAX:Max\:%6.2lf\\n"); - if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf", - "--font", "AXIS:6:$installdir/DejaVuSansMono.ttf", + if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font", + "--font", "AXIS:6:$mono_font", "--font-render-mode", "normal");} $opts = array_merge($optsa, $optsb);