Skip to content

Commit

Permalink
Added RRDTool output to graph properties
Browse files Browse the repository at this point in the history
When clicking "Graph/Properties" the output was only the command that was run and not the output.
  • Loading branch information
micke2k committed Mar 28, 2016
1 parent 589100b commit 2a729f0
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 2a729f0

Please sign in to comment.