From 02b3e17bba6c253164eb9fa7a12a39d7e15ad6a3 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 11 Sep 2010 09:33:41 +0200 Subject: [PATCH] Rename the "graph_data_json" action to "instance_data_json". --- share/collection.js | 2 +- src/Makefile.am | 2 +- ...tion_graph_data_json.c => action_instance_data_json.c} | 8 ++++---- ...tion_graph_data_json.h => action_instance_data_json.h} | 4 ++-- src/action_show_instance.c | 2 +- src/main.c | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) rename src/{action_graph_data_json.c => action_instance_data_json.c} (94%) rename src/{action_graph_data_json.h => action_instance_data_json.h} (92%) diff --git a/share/collection.js b/share/collection.js index e352d51..63bfd08 100644 --- a/share/collection.js +++ b/share/collection.js @@ -181,7 +181,7 @@ function json_graph_update (index) inst.raphael = Raphael ("c4-graph" + index); params = instance_get_params (inst); - params.action = "graph_data_json"; + params.action = "instance_data_json"; params.begin = inst.begin; params.end = inst.end; diff --git a/src/Makefile.am b/src/Makefile.am index 96bbae7..bd98699 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -16,7 +16,7 @@ bin_PROGRAMS = collection.fcgi collection_fcgi_SOURCES = main.c \ oconfig.c oconfig.h aux_types.h scanner.l parser.y \ action_graph.c action_graph.h \ - action_graph_data_json.c action_graph_data_json.h \ + action_instance_data_json.c action_instance_data_json.h \ action_graph_def_json.c action_graph_def_json.h \ action_list_graphs.c action_list_graphs.h \ action_list_hosts.c action_list_hosts.h \ diff --git a/src/action_graph_data_json.c b/src/action_instance_data_json.c similarity index 94% rename from src/action_graph_data_json.c rename to src/action_instance_data_json.c index e103b97..53823f3 100644 --- a/src/action_graph_data_json.c +++ b/src/action_instance_data_json.c @@ -1,5 +1,5 @@ /** - * collection4 - action_graph_data_json.c + * collection4 - action_instance_data_json.c * Copyright (C) 2010 Florian octo Forster * * This program is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ #include #include -#include "action_graph_data_json.h" +#include "action_instance_data_json.h" #include "common.h" #include "graph.h" #include "graph_instance.h" @@ -48,7 +48,7 @@ static void write_callback (__attribute__((unused)) void *ctx, /* {{{ */ fwrite ((void *) str, /* size = */ len, /* nmemb = */ 1, stdout); } /* }}} void write_callback */ -int action_graph_data_json (void) /* {{{ */ +int action_instance_data_json (void) /* {{{ */ { graph_config_t *cfg; graph_instance_t *inst; @@ -119,6 +119,6 @@ int action_graph_data_json (void) /* {{{ */ yajl_gen_free (handler); return (status); -} /* }}} int action_graph_data_json */ +} /* }}} int action_instance_data_json */ /* vim: set sw=2 sts=2 et fdm=marker : */ diff --git a/src/action_graph_data_json.h b/src/action_instance_data_json.h similarity index 92% rename from src/action_graph_data_json.h rename to src/action_instance_data_json.h index 1da9571..08a840f 100644 --- a/src/action_graph_data_json.h +++ b/src/action_instance_data_json.h @@ -1,5 +1,5 @@ /** - * collection4 - action_graph_data_json.h + * collection4 - action_instance_data_json.h * Copyright (C) 2010 Florian octo Forster * * This program is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ #ifndef ACTION_GRAPH_DATA_JSON_H #define ACTION_GRAPH_DATA_JSON_H 1 -int action_graph_data_json (void); +int action_instance_data_json (void); #endif /* ACTION_GRAPH_DATA_JSON_H */ /* vim: set sw=2 sts=2 et fdm=marker : */ diff --git a/src/action_show_instance.c b/src/action_show_instance.c index 15130ad..b67e8b0 100644 --- a/src/action_show_instance.c +++ b/src/action_show_instance.c @@ -309,7 +309,7 @@ static int show_instance_rrdtool (graph_config_t *cfg, /* {{{ */ script_name (), params, title, descr); #if 0 - printf ("
" + printf ("
" "Get graph data as JSON
\n", script_name (), params, time_params); #endif diff --git a/src/main.c b/src/main.c index a97a615..0722403 100644 --- a/src/main.c +++ b/src/main.c @@ -37,7 +37,7 @@ #include "utils_cgi.h" #include "action_graph.h" -#include "action_graph_data_json.h" +#include "action_instance_data_json.h" #include "action_graph_def_json.h" #include "action_list_graphs.h" #include "action_list_hosts.h" @@ -64,7 +64,7 @@ static int action_usage (void); static const action_t actions[] = { { "graph", action_graph }, - { "graph_data_json", action_graph_data_json }, + { "instance_data_json", action_instance_data_json }, { "graph_def_json", action_graph_def_json }, { "list_graphs", action_list_graphs }, { "list_hosts", action_list_hosts }, -- 2.30.2