Hi,
I'm new to the list. I already modified hobbit server to allow a TOOLTIP tag for hosts. This displays a tooltip box when hovering over the hostname. Ofcourse same should be done for the status dots etc. Tooltips are heavily underappreciated and can be extremely useful in limiting the amount of mouse clicks in order to get detailed information or help.
I can sent the few lines I changed to implement the tooltips. I use browser supported HTML and CSS instead of javascript etc. Keep It Simple & Stupid (KISS) is my favorite implementation style :)
Marco Schoemaker (mailto:marco at nlr.nl) Systems Programmer @ NLR ODIC (ICT/OS) National Aerospace laboratory NLR http://www.nlr.nl/
Hi Marco,
I'm very interested in what you've changed to make the tooltip working!
Many thanks in advance
Johann
-----Original Message----- From: Schoemaker, M.C.Z. [mailto:marco at nlr.nl] Sent: Freitag, 20. Juli 2007 09:27 To: hobbit at hswn.dk Subject: RE: [hobbit] Feature request: DESCR popup
Hi,
I'm new to the list. I already modified hobbit server to allow a TOOLTIP tag for hosts. This displays a tooltip box when hovering over the hostname. Ofcourse same should be done for the status dots etc. Tooltips are heavily underappreciated and can be extremely useful in limiting the amount of mouse clicks in order to get detailed information or help.
I can sent the few lines I changed to implement the tooltips. I use browser supported HTML and CSS instead of javascript etc. Keep It Simple & Stupid (KISS) is my favorite implementation style :)
Marco Schoemaker (mailto:marco at nlr.nl) Systems Programmer @ NLR ODIC (ICT/OS) National Aerospace laboratory NLR http://www.nlr.nl/
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
It not possible to mail attachements over 30kB. How do I get the changed files over?
This is from bb-hosts.5:
.IP "TOOLTIP:Host tooltip" Adds a small tooltip text when the mousepointer hoovers over the hostname on the webpage. This can be used to give extensive information on the host, without taking up precious space on the webpage or the user having to click to another page with extensive information. If the tooltip includes whitespace, it must be in double-quotes, e.g. TOOLTIP:"Sun webserver"
I included the changed files, but can also make a patch file for the 4.2.0 stuff if you like. The files I changed are:
bbdisplay/loadbbhosts.c
common/bb-hosts.5
lib/htmllog.c
lib/loadhosts.c
lib/loadhosts.h
web/bb-findhost.c
web/hobbit-confreport.c
They are attached. Hope it can be included in future releases. I'm willing to spent some more time on optimizations.
Marco
There are no attachements to this mail.
Best would be to make a patch file.
Thanks Johann
-----Original Message----- From: Schoemaker, M.C.Z. [mailto:marco at nlr.nl] Sent: Freitag, 20. Juli 2007 10:55 To: hobbit at hswn.dk Subject: RE: [hobbit] Feature request: DESCR popup
It not possible to mail attachements over 30kB. How do I get the changed files over?
This is from bb-hosts.5:
.IP "TOOLTIP:Host tooltip" Adds a small tooltip text when the mousepointer hoovers over the hostname on the webpage. This can be used to give extensive information on the host, without taking up precious space on the webpage or the user having to click to another page with extensive information. If the tooltip includes whitespace, it must be in double-quotes, e.g. TOOLTIP:"Sun webserver"
I included the changed files, but can also make a patch file for the 4.2.0 stuff if you like. The files I changed are:
bbdisplay/loadbbhosts.c common/bb-hosts.5 lib/htmllog.c lib/loadhosts.c lib/loadhosts.h web/bb-findhost.c web/hobbit-confreport.c
They are attached. Hope it can be included in future releases. I'm willing to spent some more time on optimizations.
Marco
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
It not possible to mail attachements over 30kB. How do I get the changed files over?
I'll mail patch data instead, it's not that much.
-- bbdisplay/loadbbhosts.c 590a591
char *tooltip;
634a636
tooltip = bbh_item(bbhost, BBH_TOOLTIP);
684c686 < comment, description,
(comment?comment:tooltip), description,
708c710 < comment, description,
(comment?comment:tooltip), description,
756c758 < comment, description,
(comment?comment:tooltip), description,
-- common/bb-hosts.5 192a193,200
.IP "TOOLTIP:Host tooltip" Adds a small tooltip text when the mousepointer hoovers over the hostname on the webpage. This can be used to give extensive information on the host, without taking up precious space on the webpage or the user having to click to another page with extensive information. If the tooltip includes whitespace, it must be in double-quotes, e.g. TOOLTIP:"Sun webserver"
-- lib/htmllog.c 394c394,395 < char *cmt, *disp, *hname;
char *cmt, *disp, *hname, *tip; int len;
403a405
tip = bbh_item(host, BBH_TOOLTIP);
406,412c408,417 < if (cmt) { < result = (char *)malloc(strlen(disp) + strlen(cmt) + 4); < sprintf(result, "%s (%s)", disp, cmt); < return result; < } < else < return disp;
if(cmt || tip) { len=strlen(disp)+15+7; /* Add <span title=".."></span> tags */ if(cmt) len+=strlen(cmt)+3; /* Add ' (cmt)' */ if(tip) len+=strlen(tip); /* Add tip in title */ else len+=strlen(cmt); /* Add cmt in title */ result=(char *)malloc(len+1); if(cmt) sprintf(result,"<span title=\"%s\">%s (%s)</span>",(tip?tip:cmt),disp,cmt); else sprintf(result,"<span title=\"%s\">%s</span>",tip,disp); return result; } else return disp;
-- lib/loadhosts.c 53a54,55
bbh_item_key[BBH_TOOLTIP] = "TOOLTIP:"; bbh_item_name[BBH_TOOLTIP] = "BBH_TOOLTIP";
-- lib/loadhosts.h 18a19
BBH_TOOLTIP,
-- web/bb-findhost.c 182c182 < char *hostname, *displayname, *comment, *ip;
char *hostname, *displayname, *comment, *tooltip, *ip;
186a187
tooltip = bbh_item(hostwalk, BBH_TOOLTIP);
191a193
(tooltip && regexec (&re, tooltip, (size_t)0, NULL, 0) == 0) ||
-- web/hobbit-confreport.c 138c138 < char *dispname = NULL, *clientalias = NULL, *comment = NULL, *description = NULL, *pagepathtitle = NULL;
char *dispname = NULL, *clientalias = NULL, *comment = NULL, *tooltip = NULL, *description = NULL,
*pagepathtitle = NULL; 157a158
tooltip = bbh_item(hinfo, BBH_TOOLTIP);
167a169
if (tooltip) rowcount++;
186a189
if (tooltip) fprintf(stdout, "<tr><td>Tooltip: %s</td></tr>\n", tooltip);
Enjoy.
Marco
Hi Marco,
I've raised the limit on the size of messages to 100 KB, but the preferred method really is a patch file - but if possible please use "diff -u" when generating the patch, because this is much easier to read - and apply, if my source-tree has been modified compared to your original tree (which is very likely).
I looked at the patch you sent, but either you left out some of it, or I don't quite understand how it works. As far as I can see your patch doesnt change the way the static pages generated by bbgen are built - there's a change to bbdisplay/loadbbhosts.c where you pick up the tooltip setting, but it doesn't seem like it is used for anything but as a replacement for the COMMENT: setting. I had expected a change to bbdisplay/pagegen.c also ?
Reading up on what the "span" tag does in HTML 4, I think I can guess what your code does. So I'll get that incorporated.
Regards, Henrik
On Fri, Jul 20, 2007 at 09:27:01AM +0200, Schoemaker, M.C.Z. wrote:
I'm new to the list. I already modified hobbit server to allow a TOOLTIP tag for hosts. This displays a tooltip box when hovering over the hostname. Ofcourse same should be done for the status dots etc. Tooltips are heavily underappreciated and can be extremely useful in limiting the amount of mouse clicks in order to get detailed information or help.
I can sent the few lines I changed to implement the tooltips. I use browser supported HTML and CSS instead of javascript etc.
participants (3)
-
henrik@hswn.dk
-
Johann.Eggers@teleatlas.com
-
marco@nlr.nl