diff --git a/html/includes/graphs/graph.inc.php b/html/includes/graphs/graph.inc.php index 7fa1ce7f9..c2a53e4df 100644 --- a/html/includes/graphs/graph.inc.php +++ b/html/includes/graphs/graph.inc.php @@ -84,16 +84,17 @@ else function graph_error($string) { - global $config, $width, $height, $debug, $graphfile, $rrd_options, $rrd_switches; + global $_GET, $config, $debug, $graphfile; - #$rrd_options .= " HRULE:0#cc0000"; - #$rrd_cmd = $config['rrdtool'] . " graph $graphfile $rrd_options" . $rrd_switches; + $_GET['bg'] = "FFBBBB"; - echo(rrdtool_graph($graphfile, " --title='".$string."' -l 0 -u 100 -E --start -10y --end now --width $width --height $height -c BACK#ff9999cc -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c FONT#000000 -c CANVAS#FFFFFF00 -c GRID#a5a5a5 -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal --font LEGEND:8:DejaVuSansMono --font AXIS:7:DejaVuSansMono --font-render-mode normal HRULE:0#cc0000")); + include("includes/graphs/common.inc.php"); + $rrd_options .= " HRULE:0#555555"; + $rrd_options .= " --title='".$string."'"; + + rrdtool_graph($graphfile, $rrd_options); if ($height > "99") { - #$rrd_cmd .= " --only-graph"; } - $woo = shell_exec($rrd_cmd); if ($debug) { echo("
".$rrd_cmd."
"); } if (is_file($graphfile) && !$debug) diff --git a/html/pages/device/overview/mempools.inc.php b/html/pages/device/overview/mempools.inc.php index 8102db89d..86afa094a 100644 --- a/html/pages/device/overview/mempools.inc.php +++ b/html/pages/device/overview/mempools.inc.php @@ -16,12 +16,12 @@ if (count($mempools)) foreach($mempools as $mempool) { if (is_integer($mempool_rows/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } - $perc = round($mempool['mempool_perc'],0); + $percent= round($mempool['mempool_perc'],0); $text_descr = rewrite_entity_descr($mempool['mempool_descr']); $total = formatStorage($mempool['mempool_total']); $used = formatStorage($mempool['mempool_used']); $free = formatStorage($mempool['mempool_free']); - $background = get_percentage_colours($perc); + $background = get_percentage_colours($percent); $graph_array = array(); $graph_array['height'] = "100"; diff --git a/html/pages/device/overview/storage.inc.php b/html/pages/device/overview/storage.inc.php index 340af16d6..d67378281 100644 --- a/html/pages/device/overview/storage.inc.php +++ b/html/pages/device/overview/storage.inc.php @@ -42,11 +42,11 @@ if (count($drives)) if ($skipdrive) { continue; } if (is_integer($drive_rows/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } - $perc = round($drive['storage_perc'], 0); + $percent = round($drive['storage_perc'], 0); $total = formatStorage($drive['storage_size']); $free = formatStorage($drive['storage_free']); $used = formatStorage($drive['storage_used']); - $background = get_percentage_colours($perc); + $background = get_percentage_colours($percent); $graph_array = array(); $graph_array['height'] = "100"; @@ -69,7 +69,7 @@ if (count($drives)) $minigraph = generate_graph_tag($graph_array); echo(" - ".overlib_link($link, $text_descr, $overlib_content)." + ".overlib_link($link, $drive['storage_descr'], $overlib_content)." ".overlib_link($link, $minigraph, $overlib_content)." ".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."