Skip to content

Commit

Permalink
Merge pull request Cacti#31 from micke2k/features/addrrdtooloutput
Browse files Browse the repository at this point in the history
Added RRDTool output to graph properties
  • Loading branch information
cigamit committed Mar 28, 2016
2 parents 589100b + 2a729f0 commit 2396323
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,15 +412,21 @@ function(data) {
if (!isempty_request_var('graph_end')) {
$graph_data_array['graph_end'] = get_request_var('graph_end');
}


$graph_data_array['output_flag'] = RRDTOOL_OUTPUT_STDERR;
$graph_data_array['print_source'] = 1;

print "<table align='center' width='100%' class='cactiTable'<tr><td>\n";
print "<table class='cactiTable' width='100%'>\n";
print "<tr class='tableHeader'><td colspan='3' class='linkOverDark' style='font-weight:bold;'>RRDtool Graph Syntax</td></tr>\n";
print "<tr><td><pre>\n";
print trim(@rrdtool_function_graph(get_request_var('local_graph_id'), get_request_var('rra_id'), $graph_data_array));
print "<span class='textInfo'>RRDTool Command:</span><br>";
print @rrdtool_function_graph(get_request_var('local_graph_id'), get_request_var('rra_id'), $graph_data_array);
unset($graph_data_array['print_source']);
print "<span class='textInfo'>RRDTool Says:</span><br>";
print @rrdtool_function_graph(get_request_var('local_graph_id'), get_request_var('rra_id'), $graph_data_array);
print "</pre></td></tr>\n";
print "</table></td></tr></table>\n";

exit;
break;
}
Expand Down

0 comments on commit 2396323

Please sign in to comment.