From: Florian Forster Date: Fri, 9 Jul 2010 13:01:20 +0000 (+0200) Subject: "list graphs" and "list hosts" actions: Add links to each other. X-Git-Tag: v4.0.0~116 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=55ef95c2ada9f31247559f6464ed6216a96699fb;p=collection4.git "list graphs" and "list hosts" actions: Add links to each other. --- diff --git a/src/action_list_graphs.c b/src/action_list_graphs.c index 89c5d62..db45899 100644 --- a/src/action_list_graphs.c +++ b/src/action_list_graphs.c @@ -35,6 +35,16 @@ #include #include +static int left_menu (__attribute__((unused)) void *user_data) /* {{{ */ +{ + printf ("\n\n", + script_name ()); + + return (0); +} /* }}} int left_menu */ + static int print_one_graph (graph_config_t *cfg, /* {{{ */ __attribute__((unused)) void *user_data) { @@ -65,7 +75,7 @@ static int print_one_graph (graph_config_t *cfg, /* {{{ */ static int print_all_graphs (__attribute__((unused)) void *user_data) /* {{{ */ { - printf ("
    \n"); + printf ("
      \n"); gl_graph_get_all (print_one_graph, /* user_data = */ NULL); printf ("
    \n"); @@ -83,6 +93,7 @@ int action_list_graphs (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_graphs; html_print_page (title, &pg_callbacks, /* user data = */ NULL); diff --git a/src/action_list_hosts.c b/src/action_list_hosts.c index b58d6bb..173ecab 100644 --- a/src/action_list_hosts.c +++ b/src/action_list_hosts.c @@ -35,6 +35,16 @@ #include #include +static int left_menu (__attribute__((unused)) void *user_data) /* {{{ */ +{ + printf ("\n\n", + script_name ()); + + return (0); +} /* }}} int left_menu */ + static int print_one_host (const char *host, /* {{{ */ __attribute__((unused)) void *user_data) { @@ -71,6 +81,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);