src/action_list_graphs.c: Add heading to list of hosts.
[collection4.git] / src / action_list_graphs.c
index e32b999..baf116f 100644 (file)
@@ -201,7 +201,8 @@ static int print_host_list (__attribute__((unused)) void *user_data) /* {{{ */
     return (0);
   }
 
-  printf ("<ul id=\"host-list\">\n");
+  printf ("<div><h3>List of hosts</h3>\n"
+      "<ul id=\"host-list\">\n");
   for (i = 0; i < hosts_argc; i++)
   {
     char *host = hosts_argv[i];
@@ -213,12 +214,12 @@ static int print_host_list (__attribute__((unused)) void *user_data) /* {{{ */
 
     host_html = html_escape (host);
 
-    printf ("  <li><a href=\"%s?action=list_graphs&search=%s\">%s</a></li>\n",
+    printf ("  <li><a href=\"%s?action=list_graphs&q=%s\">%s</a></li>\n",
         script_name (), host_html, host_html);
 
     free (host_html);
   }
-  printf ("</ul>\n");
+  printf ("</ul></div>\n");
 
   array_destroy (data.array);
 
@@ -256,10 +257,8 @@ int action_list_graphs (void) /* {{{ */
 
   gl_update ();
 
-  search = strtolower_copy (param ("search"));
-
+  search = strtolower_copy (param ("q"));
   status = list_graphs_html (search);
-
   free (search);
 
   return (status);