index 1ba067892459b7d231a0c7cd872bfa64e44676d0..2003d2f4c062c5d6b643baeeb9353d97770897a7 100644 (file)
#include "action_graph_def_json.h"
#include "common.h"
#include "graph.h"
+#include "graph_instance.h"
#include "graph_list.h"
#include "utils_cgi.h"
int action_graph_def_json (void) /* {{{ */
{
graph_config_t *cfg;
+ graph_instance_t *inst;
yajl_gen_config handler_config;
yajl_gen handler;
if (cfg == NULL)
return (ENOMEM);
+ inst = inst_get_selected (cfg);
+ if (inst == NULL)
+ return (EINVAL);
+
memset (&handler_config, 0, sizeof (handler_config));
handler_config.beautify = 1;
handler_config.indentString = " ";
time_buffer);
printf ("\n");
- status = graph_def_to_json (cfg, handler);
+ status = graph_def_to_json (cfg, inst, handler);
yajl_gen_free (handler);