src/dp_rrdtool.c: Adapt to new callback prototype.
[collection4.git] / src / action_list_hosts.c
index b58d6bb..0e7b963 100644 (file)
 #include <fcgiapp.h>
 #include <fcgi_stdio.h>
 
+static int left_menu (__attribute__((unused)) void *user_data) /* {{{ */
+{
+  printf ("\n<ul class=\"menu left\">\n"
+      "  <li><a href=\"%s?action=search\">Search</a></li>\n"
+      "  <li><a href=\"%s?action=list_graphs\">All graphs</a></li>\n"
+      "</ul>\n",
+      script_name (), script_name ());
+
+  return (0);
+} /* }}} int left_menu */
+
 static int print_one_host (const char *host, /* {{{ */
     __attribute__((unused)) void *user_data)
 {
@@ -62,8 +73,6 @@ static int print_all_hosts (__attribute__((unused)) void *user_data) /* {{{ */
 
 int action_list_hosts (void) /* {{{ */
 {
-  gl_update ();
-
   page_callbacks_t pg_callbacks = PAGE_CALLBACKS_INIT;
   char title[512];
 
@@ -71,6 +80,7 @@ int action_list_hosts (void) /* {{{ */
   title[sizeof (title) - 1] = 0;
 
   pg_callbacks.top_right = html_print_search_box;
+  pg_callbacks.middle_left = left_menu;
   pg_callbacks.middle_center = print_all_hosts;
 
   html_print_page (title, &pg_callbacks, /* user data = */ NULL);