From 2a729f060fbb1a4de7167d1660da5aebec296a90 Mon Sep 17 00:00:00 2001 From: Micke2k Date: Mon, 28 Mar 2016 16:09:44 +0400 Subject: [PATCH] Added RRDTool output to graph properties When clicking "Graph/Properties" the output was only the command that was run and not the output. --- graph.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/graph.php b/graph.php index 73686b3859..5b96b7083b 100644 --- a/graph.php +++ b/graph.php @@ -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 "
\n"; print "\n"; print "\n"; print "\n"; print "
RRDtool Graph Syntax
\n";
-	print trim(@rrdtool_function_graph(get_request_var('local_graph_id'), get_request_var('rra_id'), $graph_data_array));
+	print "RRDTool Command:
"; + 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 "RRDTool Says:
"; + print @rrdtool_function_graph(get_request_var('local_graph_id'), get_request_var('rra_id'), $graph_data_array); print "
\n"; - exit; break; }