+ case 'list_graphs':
+ // Generate list of types for selected hosts, plugin and plugin-instance
+ $arg_hosts = read_var('host', $_POST, '');
+ if (is_array($arg_hosts))
+ $arg_hosts = reset($arg_hosts);
+ $arg_plugin = read_var('plugin', $_POST, '');
+ $arg_pinst = read_var('plugin_instance', $_POST, '');
+ $arg_type = read_var('type', $_POST, '');
+ $arg_tinst = read_var('type_instance', $_POST, '');
+ $arg_log = (int)read_var('logarithmic', $_POST, '0');
+ $arg_legend = (int)read_var('tinyLegend', $_POST, '0');
+ $arg_period = read_var('timespan', $_POST, '');
+ $graphs = collectd_list_graphs($arg_hosts, $arg_plugin, $arg_pinst, $arg_type, $arg_tinst);
+ foreach ($graphs as &$graph) {
+ $graph['logarithmic'] = $arg_log;
+ $graph['tinyLegend'] = $arg_legend;
+ $graph['timespan'] = $arg_period;
+ }
+ return dhtml_response_graphs($graphs, 'ListOfGraph');
+