summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fbcd7ba)
raw | patch | inline | side by side (parent: fbcd7ba)
author | Florian Forster <ff@octo.it> | |
Thu, 8 Jul 2010 09:40:04 +0000 (11:40 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 8 Jul 2010 09:40:04 +0000 (11:40 +0200) |
src/action_list_graphs.c | patch | blob | history | |
src/graph.c | patch | blob | history | |
src/graph.h | patch | blob | history |
index 2b26043846766af2e3e0ff17f2fe4882b7f2baad..7973a08edfd9081806ef28dae8b6093c2a98e882 100644 (file)
--- a/src/action_list_graphs.c
+++ b/src/action_list_graphs.c
char params[1024];
char title[1024];
+ if (graph_num_instances (cfg) < 1)
+ return (0);
+
memset (title, 0, sizeof (title));
graph_get_title (cfg, title, sizeof (title));
html_escape_buffer (title, sizeof (title));
diff --git a/src/graph.c b/src/graph.c
index f2699e136982653b7dbc4530e10d0d9ce35bf959..9b545fd702922f7c73c45ca63db5cef4396b168a 100644 (file)
--- a/src/graph.c
+++ b/src/graph.c
*(graph_instance_t * const *) v1));
} /* }}} int graph_sort_instances_cb */
+size_t graph_num_instances (graph_config_t *cfg) /* {{{ */
+{
+ if (cfg == NULL)
+ return ((size_t) -1);
+
+ return (cfg->instances_num);
+} /* }}} size_t graph_num_instances */
+
int graph_sort_instances (graph_config_t *cfg) /* {{{ */
{
if (cfg == NULL)
diff --git a/src/graph.h b/src/graph.h
index 26b4ac619bf5975074bbec6721e0629ee2de1b43..b6f2e7c539b9b50a60c8eecc0607cf2a5e7d483c 100644 (file)
--- a/src/graph.h
+++ b/src/graph.h
int graph_compare (graph_config_t *cfg, const graph_ident_t *ident);
+size_t graph_num_instances (graph_config_t *cfg);
+
int graph_sort_instances (graph_config_t *cfg);
int graph_clear_instances (graph_config_t *cfg);