mirror of
https://github.com/librenms/librenms.git
synced 2024-09-25 04:19:07 +00:00
error graphs match size. use correct variables for storate and mempools overview.
git-svn-id: http://www.observium.org/svn/observer/trunk@2509 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
parent
f367b07294
commit
4514365d4f
@ -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("<pre>".$rrd_cmd."</pre>"); }
|
||||
if (is_file($graphfile) && !$debug)
|
||||
|
@ -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";
|
||||
|
@ -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("<tr bgcolor=$row_colour>
|
||||
<td class=tablehead>".overlib_link($link, $text_descr, $overlib_content)."</td>
|
||||
<td class=tablehead>".overlib_link($link, $drive['storage_descr'], $overlib_content)."</td>
|
||||
<td width=90>".overlib_link($link, $minigraph, $overlib_content)."</td>
|
||||
<td width=200>".overlib_link($link, print_percentage_bar (200, 20, $percent, NULL, "ffffff", $background['left'], $percent . "%", "ffffff", $background['right']), $overlib_content)."
|
||||
</a></td>
|
||||
|
Loading…
Reference in New Issue
Block a user