summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e6c6e80)
raw | patch | inline | side by side (parent: e6c6e80)
author | Florian Forster <octo@verplant.org> | |
Wed, 8 Sep 2010 15:30:55 +0000 (17:30 +0200) | ||
committer | Florian Forster <octo@verplant.org> | |
Wed, 8 Sep 2010 15:30:55 +0000 (17:30 +0200) |
src/graph_ident.h | patch | blob | history | |
src/graph_instance.c | patch | blob | history | |
src/graph_instance.h | patch | blob | history |
diff --git a/src/graph_ident.h b/src/graph_ident.h
index 30d7e697862dbf3b1e6080043b91b156b95dc88c..6d033b328ff098273c18ecaeeaab92eedbdfce1d 100644 (file)
--- a/src/graph_ident.h
+++ b/src/graph_ident.h
#include <yajl/yajl_gen.h>
#include "graph_types.h"
+#include "data_provider.h"
#define ANY_TOKEN "/any/"
#define ALL_TOKEN "/all/"
diff --git a/src/graph_instance.c b/src/graph_instance.c
index 86cec84c832fa8ccb02afd926a16e5da13e9f89c..23d88dcd8e40737f2cdee69178dbd54f47fd3db2 100644 (file)
--- a/src/graph_instance.c
+++ b/src/graph_instance.c
return (0);
} /* }}} int inst_to_json */
+int inst_data_to_json (const graph_instance_t *inst, /* {{{ */
+ dp_time_t begin, dp_time_t end,
+ yajl_gen handler)
+{
+ size_t i;
+
+ yajl_gen_array_open (handler);
+ for (i = 0; i < inst->files_num; i++)
+ ident_data_to_json (inst->files[i], begin, end, handler);
+ yajl_gen_array_close (handler);
+
+ return (0);
+} /* }}} int inst_data_to_json */
+
int inst_describe (graph_config_t *cfg, graph_instance_t *inst, /* {{{ */
char *buffer, size_t buffer_size)
{
diff --git a/src/graph_instance.h b/src/graph_instance.h
index 5a9cd478838acc72833ea127f10056d20bf4c9c9..0279deb3da1781d49c860bb094f138b8db4b0782 100644 (file)
--- a/src/graph_instance.h
+++ b/src/graph_instance.h
#include <yajl/yajl_gen.h>
#include "graph_types.h"
+#include "data_provider.h"
#include "graph_ident.h"
#include "rrd_args.h"
#include "utils_array.h"
graph_ident_field_t field, const char *field_value);
int inst_to_json (const graph_instance_t *inst, yajl_gen handler);
+int inst_data_to_json (const graph_instance_t *inst,
+ dp_time_t begin, dp_time_t end,
+ yajl_gen handler);
int inst_describe (graph_config_t *cfg, graph_instance_t *inst,
char *buffer, size_t buffer_size);