+
+ return (0);
+} /* }}} int list_graphs_json */
+
+static int list_graphs_html (void) /* {{{ */
+{
+ printf ("Content-Type: text/html\n\n");
+
+ printf ("<ul>\n");
+ gl_foreach (print_graph_html, /* user_data = */ NULL);
+ printf ("</ul>\n");
+
+ return (0);
+} /* }}} int list_graphs_html */
+
+int action_list_graphs (void) /* {{{ */
+{
+ const char *format;
+
+ gl_update ();
+
+ format = param ("format");
+ if (format == NULL)
+ format = "html";
+
+ if (strcmp ("json", format) == 0)
+ return (list_graphs_json ());
+ else
+ return (list_graphs_html ());