On "Graph Utility View" add the name of and a link to the graph template which the graph is based on
Feature Request
Is your feature request related to a problem? Please describe
When you need to do template reviews, it is not helpful to have to go thru manual DB queries in order to find out, which graph-template a graph is based on.
Describe the solution you'd like
On the Graph Utility View, add a line under "Summary Details" which shows the graph template, best would be a hyperlink that directly takes you to the template.
I quick-hacked it into our code to see if it works. It's just a few lines in graph_xport.php and a small addition in lib/rrd.php Would be nice to have also a link to the template, but this would need some privileges-evaluation so that users without template-edit permissions don't see the link, but only the template ID as plain number.
in lib/rrd.php: function rrdtool_function_graph()
- around line 1350 i added "gtg.graph_template_id" to the query
- at the bottom where the returned xport_array is assembled, add: $xport_array['meta']['graph_template_id'] = $graph['graph_template_id'];
and in graph_xport.php i added the ouptut of another line with the template ID after line 195 with the scheme from above.
BTW this part could be cleaned up using a function to generate the table rows. If i find time i can prepare the code and do a pull req.
Describe alternatives you've considered
Alternatives are a pain ... select id, local_graph_template_graph_id, local_graph_id, graph_template_id, title_cache from graph_templates_graph where local_graph_id=[graph ID]; then go to the templates page and search for the template ID ... you get the point ...