--- bbdisplay/bbgen.1 2006/08/09 19:49:45 1.98 +++ bbdisplay/bbgen.1 2007/09/12 19:37:16 @@ -160,6 +160,15 @@ .sp .IP "--reverseskin=URL" Same as "--dialupskin", but for reverse tests (tests with '!' in front). +.sp +.IP "--tooltips=[always,never,main]" +Determines which pages use tooltips to show the description of the host +(from the COMMENT entry in the +.I bb-hosts(5) +file). If set to \fBalways\fR, tooltips are used on all pages. If set to +\fBnever\fR, tooltips are never used. If set to \fBmain\fR, tooltips are +used on the main pages, but not on the BB2 (all non-green) or NK (critical +systems) pages. .SH COLUMN SELECTION OPTIONS These options affect which columns (tests) are included in the webpages --- bbdisplay/bbgen.c 2007/09/11 21:20:54 1.229 +++ bbdisplay/bbgen.c 2007/09/12 19:32:50 @@ -51,6 +51,7 @@ double reportgreenlevel = 99.995; int reportstyle = STYLE_CRIT; int dynamicreport = 1; +enum tooltipuse_t tooltipuse = TT_BBONLY; char *reqenv[] = { "BB", @@ -412,6 +413,14 @@ select_headers_and_footers(lp); } + else if (argnmatch(argv[i], "--tooltips=")) { + char *lp = strchr(argv[i], '='); + lp++; + if (strcmp(lp, "always") == 0) tooltipuse = TT_ALWAYS; + else if (strcmp(lp, "never") == 0) tooltipuse = TT_NEVER; + else tooltipuse = TT_BBONLY; + } + else if (argnmatch(argv[i], "--purplelog=")) { char *lp = strchr(argv[i], '='); if (*(lp+1) == '/') purplelogfn = strdup(lp+1); --- bbdisplay/bbgen.h 2007/02/13 12:25:37 1.130 +++ bbdisplay/bbgen.h 2007/09/12 19:30:44 @@ -218,6 +218,9 @@ struct dispsummary_t *next; } dispsummary_t; +enum tooltipuse_t { TT_BBONLY, TT_ALWAYS, TT_NEVER}; + +extern enum tooltipuse_t tooltipuse; extern bbgen_page_t *pagehead; extern state_t *statehead; extern bbgen_col_t *colhead, null_column; --- bbdisplay/pagegen.c 2007/08/15 06:47:18 1.189 +++ bbdisplay/pagegen.c 2007/09/12 19:27:16 @@ -338,12 +338,19 @@ int columncount; char *bbskin; int rowcount = 0; + int usetooltip = 0; if (head == NULL) return; bbskin = strdup(xgetenv("BBSKIN")); + switch (tooltipuse) { + case TT_BBONLY: usetooltip = (pagetype == PAGE_BB); break; + case TT_ALWAYS: usetooltip = 1; break; + case TT_NEVER: usetooltip = 0; break; + } + /* Generate static or dynamic links (from BBLOGSTATUS) ? */ genstatic = generate_static();