static int print_all_graphs (__attribute__((unused)) void *user_data) /* {{{ */
{
+ const char *dynamic;
+ _Bool include_dynamic = 0;
+
+ dynamic = param ("dynamic");
+ if ((dynamic != NULL)
+ && (strcmp ("true", dynamic) == 0))
+ include_dynamic = 1;
+
printf (" <ul class=\"graph_list\">\n");
- gl_graph_get_all (print_one_graph, /* user_data = */ NULL);
+ gl_graph_get_all (include_dynamic, print_one_graph, /* user_data = */ NULL);
printf (" </ul>\n");
return (0);
return (0);
} /* }}} int graph_config_submit */
-int gl_graph_get_all (graph_callback_t callback, /* {{{ */
- void *user_data)
+int gl_graph_get_all (_Bool include_dynamic, /* {{{ */
+ graph_callback_t callback, void *user_data)
{
size_t i;
return (status);
}
+ if (!include_dynamic)
+ return (0);
+
for (i = 0; i < gl_dynamic_num; i++)
{
int status;
graph_config_t *gl_graph_get_selected (void);
-int gl_graph_get_all (graph_callback_t callback, void *user_data);
+int gl_graph_get_all (_Bool include_dynamic,
+ graph_callback_t callback, void *user_data);
int gl_graph_instance_get_all (graph_config_t *cfg, graph_inst_callback_t callback,
void *user_data);