summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a164d75)
raw | patch | inline | side by side (parent: a164d75)
author | Florian Forster <ff@octo.it> | |
Fri, 9 Jul 2010 13:01:20 +0000 (15:01 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 9 Jul 2010 13:01:20 +0000 (15:01 +0200) |
src/action_list_graphs.c | patch | blob | history | |
src/action_list_hosts.c | patch | blob | history |
index 89c5d62906d58eec612e28d61a1198bbb71ca5e5..db458990d012c53dec0833827b6157f2c326f256 100644 (file)
--- a/src/action_list_graphs.c
+++ b/src/action_list_graphs.c
#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=list_hosts\">All hosts</a></li>\n"
+ "</ul>\n",
+ script_name ());
+
+ return (0);
+} /* }}} int left_menu */
+
static int print_one_graph (graph_config_t *cfg, /* {{{ */
__attribute__((unused)) void *user_data)
{
static int print_all_graphs (__attribute__((unused)) void *user_data) /* {{{ */
{
- printf (" <ul id=\"search-output\" class=\"graph_list\">\n");
+ printf (" <ul class=\"graph_list\">\n");
gl_graph_get_all (print_one_graph, /* user_data = */ NULL);
printf (" </ul>\n");
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);
index b58d6bb2a2aebe59f33e3c972b8efab1a06eed44..173ecabb9508081b2c7e8c3a1966719f679b4208 100644 (file)
--- a/src/action_list_hosts.c
+++ b/src/action_list_hosts.c
#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=list_graphs\">All graphs</a></li>\n"
+ "</ul>\n",
+ script_name ());
+
+ return (0);
+} /* }}} int left_menu */
+
static int print_one_host (const char *host, /* {{{ */
__attribute__((unused)) void *user_data)
{
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);