Xymon Mailing List Archive search

Feature request: DESCR popup

23 messages in this thread

list Johann Eggers · Thu, 19 Jul 2007 15:00:42 +0200 ·
Hi Hobbit's,

I would like to raise a litle feature request:

I like the functionality that when you hook the mousepointer over a dot
a small box pops up and displays information in the form
column:color:duration.

I (and also a lot of people in my company) would like to see this also
for the hostname links. If a DESCR tag is in the bb-hosts file for this
host it's content should be displayed in the little pop-up box. This way
it's not necessary to view the info column each time to get this info.

I think it can be done by inserting an "ALT" html-tag in the page
source-code. I looked into the pagegen.c and other modules but I didn't
find the right place to hook in. And unfortunately I'm pretty poor in C
programing.

Can someone give me a tip or is someone even able to code this (Henrik?)

Thanks
Johann
list Greg L Hubbard · Thu, 19 Jul 2007 08:11:23 -0500 ·
Feel free to take a whack at it -- it can be done in Java script. 
quoted from Johann Eggers

-----Original Message-----
From: Johann Eggers [mailto:user-769b09132207@xymon.invalid] 
Sent: Thursday, July 19, 2007 8:01 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Feature request: DESCR popup

Hi Hobbit's,

I would like to raise a litle feature request:

I like the functionality that when you hook the mousepointer over a dot
a small box pops up and displays information in the form
column:color:duration.

I (and also a lot of people in my company) would like to see this also
for the hostname links. If a DESCR tag is in the bb-hosts file for this
host it's content should be displayed in the little pop-up box. This way
it's not necessary to view the info column each time to get this info.

I think it can be done by inserting an "ALT" html-tag in the page
source-code. I looked into the pagegen.c and other modules but I didn't
find the right place to hook in. And unfortunately I'm pretty poor in C
programing.

Can someone give me a tip or is someone even able to code this (Henrik?)

Thanks
Johann
list Tod Hansmann · Thu, 19 Jul 2007 09:00:18 -0600 ·
There are several places, actually.  The easiest thing to do is look at
the page you want to modify, in the source.  Each section has a div or a
table separating the rest of it, usually labeled.  For instance, on the
bb2 page, the table has a SUMMARY of "Group Block" (this might be what
we modified it to, but I was pretty sure it was in the base source as
that).

Do a 
grep "Group Block" *
while in the bbdisplay source directory

That will tell you what line that appears in, and that will be the
function defining how that section is generated.  Find the image tag,
put an ALT and a TITLE in there, and you should be golden.  Modify other
sections accordingly.

Tod Hansmann
Network Engineer
quoted from Johann Eggers
 
 
-----Original Message-----
From: Johann Eggers [mailto:user-769b09132207@xymon.invalid] 
Sent: Thursday, July 19, 2007 7:01 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Feature request: DESCR popup

Hi Hobbit's,

I would like to raise a litle feature request:

I like the functionality that when you hook the mousepointer over a dot
a small box pops up and displays information in the form
column:color:duration.

I (and also a lot of people in my company) would like to see this also
for the hostname links. If a DESCR tag is in the bb-hosts file for this
host it's content should be displayed in the little pop-up box. This way
it's not necessary to view the info column each time to get this info.

I think it can be done by inserting an "ALT" html-tag in the page
source-code. I looked into the pagegen.c and other modules but I didn't
find the right place to hook in. And unfortunately I'm pretty poor in C
programing.

Can someone give me a tip or is someone even able to code this (Henrik?)

Thanks
Johann
list Stewart Larsen · Thu, 19 Jul 2007 11:11:52 -0400 ·
We actually made a patch against the code to show the COMMENT tag with the host name.

So, if your config line looks like
192.168.1.99    wormhole.localdomain.com #  fgtses COMMENT:"Firewall"

You get
wormhole.localdomain.com (Firewall)

on your web pages.

I can see about generating a patch against 4.2.1, but we have some other features we added as well.

Stewart
quoted from Tod Hansmann


Tod Hansmann wrote:
There are several places, actually.  The easiest thing to do is look at
the page you want to modify, in the source.  Each section has a div or a
table separating the rest of it, usually labeled.  For instance, on the
bb2 page, the table has a SUMMARY of "Group Block" (this might be what
we modified it to, but I was pretty sure it was in the base source as
that).

Do a grep "Group Block" *
while in the bbdisplay source directory

That will tell you what line that appears in, and that will be the
function defining how that section is generated.  Find the image tag,
put an ALT and a TITLE in there, and you should be golden.  Modify other
sections accordingly.

Tod Hansmann
Network Engineer
  
-----Original Message-----
From: Johann Eggers [mailto:user-769b09132207@xymon.invalid] Sent: Thursday, July 19, 2007 7:01 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Feature request: DESCR popup

Hi Hobbit's,

I would like to raise a litle feature request:

I like the functionality that when you hook the mousepointer over a dot
a small box pops up and displays information in the form
column:color:duration.

I (and also a lot of people in my company) would like to see this also
for the hostname links. If a DESCR tag is in the bb-hosts file for this
host it's content should be displayed in the little pop-up box. This way
it's not necessary to view the info column each time to get this info.

I think it can be done by inserting an "ALT" html-tag in the page
source-code. I looked into the pagegen.c and other modules but I didn't
find the right place to hook in. And unfortunately I'm pretty poor in C
programing.

Can someone give me a tip or is someone even able to code this (Henrik?)

Thanks
Johann

-- 

Stewart Larsen
--
This sig intentionally left blank, other than this text explaining that if not for this text, this sig would be blank.
list Tod Hansmann · Thu, 19 Jul 2007 09:27:59 -0600 ·
Our installation does that as well (4.2.0) but we made no modifications
in that regard.  Maybe the COMMENT functionality was adjusted recently,
or your patch was incorporated?
quoted from Stewart Larsen

Tod Hansmann
Network Engineer
  
-----Original Message-----
From: Stewart [mailto:user-4bb0ef2a7550@xymon.invalid] Sent: Thursday, July 19, 2007 9:12 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Feature request: DESCR popup

We actually made a patch against the code to show the COMMENT tag with the host name.

So, if your config line looks like
192.168.1.99    wormhole.localdomain.com #  fgtses COMMENT:"Firewall"

You get
wormhole.localdomain.com (Firewall)

on your web pages.

I can see about generating a patch against 4.2.1, but we have some other

features we added as well.

Stewart


Tod Hansmann wrote:
There are several places, actually.  The easiest thing to do is look
at
the page you want to modify, in the source.  Each section has a div or
a
table separating the rest of it, usually labeled.  For instance, on
the
bb2 page, the table has a SUMMARY of "Group Block" (this might be what
we modified it to, but I was pretty sure it was in the base source as
that).

Do a grep "Group Block" *
while in the bbdisplay source directory

That will tell you what line that appears in, and that will be the
function defining how that section is generated.  Find the image tag,
put an ALT and a TITLE in there, and you should be golden.  Modify
other
sections accordingly.

Tod Hansmann
Network Engineer
  
-----Original Message-----
From: Johann Eggers [mailto:user-769b09132207@xymon.invalid] Sent: Thursday, July 19, 2007 7:01 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Feature request: DESCR popup

Hi Hobbit's,

I would like to raise a litle feature request:

I like the functionality that when you hook the mousepointer over a
dot
a small box pops up and displays information in the form
column:color:duration.

I (and also a lot of people in my company) would like to see this also
for the hostname links. If a DESCR tag is in the bb-hosts file for
this
host it's content should be displayed in the little pop-up box. This
way
it's not necessary to view the info column each time to get this info.

I think it can be done by inserting an "ALT" html-tag in the page
source-code. I looked into the pagegen.c and other modules but I
didn't
find the right place to hook in. And unfortunately I'm pretty poor in
C
programing.

Can someone give me a tip or is someone even able to code this
(Henrik?)
Thanks
Johann

-- 
Stewart Larsen
--
This sig intentionally left blank, other than this text explaining that if not for this text, this sig would be blank.
list Johann Eggers · Thu, 19 Jul 2007 17:38:43 +0200 ·
quoted from Tod Hansmann
-----Original Message-----
From: Tod Hansmann [mailto:user-b6e28cb93fa4@xymon.invalid]
Sent: Donnerstag, 19. Juli 2007 17:28
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Feature request: DESCR popup

Our installation does that as well (4.2.0) but we made no
modifications
in that regard.  Maybe the COMMENT functionality was adjusted
recently,
or your patch was incorporated?

Tod Hansmann
Network Engineer


-----Original Message-----
From: Stewart [mailto:user-4bb0ef2a7550@xymon.invalid]
Sent: Thursday, July 19, 2007 9:12 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Feature request: DESCR popup

We actually made a patch against the code to show the COMMENT tag with
the host name.

So, if your config line looks like
192.168.1.99    wormhole.localdomain.com #  fgtses COMMENT:"Firewall"

You get
wormhole.localdomain.com (Firewall)

on your web pages.

I can see about generating a patch against 4.2.1, but we have some
other

features we added as well.

Stewart
The COMMENT tag is working well. But the COMMENT is displayed next to
the hostname. I want the DESCR to be displayed in a tooltip box. I've
searched and found a little java script which generates a tooltip box.
It uses the onMouseOver event.

<script type="text/javascript" src="wz_tooltip.js"></script>

<a href="index.htm" onmouseover="Tip('Some Text')">Startpage</a>

My problem is how to read the DESCR out of the bb-hosts file and then
integrate this in the html code.

Johann
list Stewart Larsen · Thu, 19 Jul 2007 12:11:14 -0400 ·
Ah, I remember now... Our patch was for something different.

I manage over 400 firewalls.  So we made the hostname a link to https://<IP>;


Nevermind!

Stew
quoted from Johann Eggers


Johann Eggers wrote:
-----Original Message-----
From: Tod Hansmann [mailto:user-b6e28cb93fa4@xymon.invalid]
Sent: Donnerstag, 19. Juli 2007 17:28
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Feature request: DESCR popup

Our installation does that as well (4.2.0) but we made no
modifications
in that regard.  Maybe the COMMENT functionality was adjusted
recently,
or your patch was incorporated?

Tod Hansmann
Network Engineer


-----Original Message-----
From: Stewart [mailto:user-4bb0ef2a7550@xymon.invalid]
Sent: Thursday, July 19, 2007 9:12 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Feature request: DESCR popup

We actually made a patch against the code to show the COMMENT tag with
the host name.

So, if your config line looks like
192.168.1.99    wormhole.localdomain.com #  fgtses COMMENT:"Firewall"

You get
wormhole.localdomain.com (Firewall)

on your web pages.

I can see about generating a patch against 4.2.1, but we have some
other
features we added as well.

Stewart
The COMMENT tag is working well. But the COMMENT is displayed next to
the hostname. I want the DESCR to be displayed in a tooltip box. I've
searched and found a little java script which generates a tooltip box.
It uses the onMouseOver event.

<script type="text/javascript" src="wz_tooltip.js"></script>

<a href="index.htm" onmouseover="Tip('Some Text')">Startpage</a>

My problem is how to read the DESCR out of the bb-hosts file and then
integrate this in the html code.

Johann

-- 
Stewart Larsen
--
This sig intentionally left blank, other than this text explaining that 
if not for this text, this sig would be blank.
list Galen Johnson · Thu, 19 Jul 2007 13:14:13 -0400 ·
I actually like the idea of the popup versus appending it (like it does now)...it saves valuable real estate that is better used to show your monitors.

=G=
quoted from Tod Hansmann

-----Original Message-----
From: Tod Hansmann [mailto:user-b6e28cb93fa4@xymon.invalid] 
Sent: Thursday, July 19, 2007 11:28 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Feature request: DESCR popup

Our installation does that as well (4.2.0) but we made no modifications
in that regard.  Maybe the COMMENT functionality was adjusted recently,
or your patch was incorporated?

Tod Hansmann
Network Engineer
 
 
-----Original Message-----
From: Stewart [mailto:user-4bb0ef2a7550@xymon.invalid] 
Sent: Thursday, July 19, 2007 9:12 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Feature request: DESCR popup

We actually made a patch against the code to show the COMMENT tag with 
the host name.

So, if your config line looks like
192.168.1.99    wormhole.localdomain.com #  fgtses COMMENT:"Firewall"

You get
wormhole.localdomain.com (Firewall)

on your web pages.

I can see about generating a patch against 4.2.1, but we have some other

features we added as well.

Stewart


Tod Hansmann wrote:
There are several places, actually.  The easiest thing to do is look
at
the page you want to modify, in the source.  Each section has a div or
a
table separating the rest of it, usually labeled.  For instance, on
the
bb2 page, the table has a SUMMARY of "Group Block" (this might be what
we modified it to, but I was pretty sure it was in the base source as
that).

Do a 
grep "Group Block" *
while in the bbdisplay source directory

That will tell you what line that appears in, and that will be the
function defining how that section is generated.  Find the image tag,
put an ALT and a TITLE in there, and you should be golden.  Modify
other
sections accordingly.

Tod Hansmann
Network Engineer
 
 
-----Original Message-----
From: Johann Eggers [mailto:user-769b09132207@xymon.invalid] 
Sent: Thursday, July 19, 2007 7:01 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Feature request: DESCR popup

Hi Hobbit's,

I would like to raise a litle feature request:

I like the functionality that when you hook the mousepointer over a
dot
a small box pops up and displays information in the form
column:color:duration.

I (and also a lot of people in my company) would like to see this also
for the hostname links. If a DESCR tag is in the bb-hosts file for
this
host it's content should be displayed in the little pop-up box. This
way
it's not necessary to view the info column each time to get this info.

I think it can be done by inserting an "ALT" html-tag in the page
source-code. I looked into the pagegen.c and other modules but I
didn't
find the right place to hook in. And unfortunately I'm pretty poor in
C
programing.

Can someone give me a tip or is someone even able to code this
(Henrik?)
Thanks
Johann

-- 
Stewart Larsen
--
This sig intentionally left blank, other than this text explaining that 
if not for this text, this sig would be blank.
list Tod Hansmann · Thu, 19 Jul 2007 11:34:17 -0600 ·
In the pagegen.c file, in do_host_bb2 function, we have this code after
the /* Then the columns */ comment

                        if ((groupcols == NULL) && (h->banksize > 0)) {
                                int i, j;
                                char alttag[30];
                                unsigned int baseip, ip1, ip2, ip3, ip4;

                                sscanf(h->ip, "%u.%u.%u.%u", &ip1, &ip2,
&ip3, &ip4);
                                baseip = IPtou32(ip1, ip2, ip3, ip4);

                                fprintf(output, "<TD ALIGN=CENTER><TABLE
BORDER=0>");
                                for (i=0; (i < h->banksize); i+=16) {
                                        fprintf(output, "<TR>\n");
                                        for (j=i; (((j-i) < 16) && (j <
h->banksize)); j++) {
                                                fprintf(output, "<TD
ALIGN=CENTER VALIGN=BOTTOM WIDTH=%d>", width);

                                                if (genstatic) {
                                                        /*
                                                         * Dont use
htmlextension here - it's for the
                                                         * pages
generated by bbd.
                                                         */
                                                        fprintf(output,
"<A HREF=\"%s/html/dialup.%s.html\">",
 
xgetenv("BBWEB"), h->hostname);
                                                }
                                                else {
                                                        fprintf(output,
"<A HREF=\"%s\">",
 
hostsvcurl("dialup", commafy(h->hostname), 1));
                                                }

                                                sprintf(alttag, "%s:%s",
u32toIP(baseip+j), colorname(h->banks[j]));
                                                fprintf(output, "<IMG
SRC=\"%s/%s\" ALT=\"%s\" TITLE=\"%s\" HEIGHT=\"%s\" WIDTH=\"%s\"
BORDER=0></A>",
                                                        bbskin,
dotgiffilename(h->banks[j], 0, 0),
                                                        alttag, alttag,
xgetenv("DOTHEIGHT"), xgetenv("DOTWIDTH"));

                                                fprintf(output,
"</TD>\n");
                                        }
                                        fprintf(output, "</TR>\n");
                                }
                                fprintf(output, "</TABLE></TD>\n");
                        }


I hope that helps you with your issue here, but I'm told we commented
all our changes (and I commented all mine).  Since this is not commented
with our standard, I assume this is normal code.  I'm a bit too lazy to
download the base 4.2.0 code and check, so maybe when I have some more
time.  For now, let me know if this is not what you have in your
install.  If you aren't at 4.2.0, maybe that's the issue =cP
quoted from Galen Johnson


Tod Hansmann
Network Engineer
 
 
-----Original Message-----
From: Johann Eggers [mailto:user-769b09132207@xymon.invalid] 
Sent: Thursday, July 19, 2007 9:39 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Feature request: DESCR popup

-----Original Message-----
From: Tod Hansmann [mailto:user-b6e28cb93fa4@xymon.invalid]
Sent: Donnerstag, 19. Juli 2007 17:28
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Feature request: DESCR popup

Our installation does that as well (4.2.0) but we made no
modifications
in that regard.  Maybe the COMMENT functionality was adjusted
recently,
or your patch was incorporated?

Tod Hansmann
Network Engineer


-----Original Message-----
From: Stewart [mailto:user-4bb0ef2a7550@xymon.invalid]
Sent: Thursday, July 19, 2007 9:12 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Feature request: DESCR popup

We actually made a patch against the code to show the COMMENT tag with
the host name.

So, if your config line looks like
192.168.1.99    wormhole.localdomain.com #  fgtses COMMENT:"Firewall"

You get
wormhole.localdomain.com (Firewall)

on your web pages.

I can see about generating a patch against 4.2.1, but we have some
other

features we added as well.

Stewart
The COMMENT tag is working well. But the COMMENT is displayed next to
the hostname. I want the DESCR to be displayed in a tooltip box. I've
searched and found a little java script which generates a tooltip box.
It uses the onMouseOver event.

<script type="text/javascript" src="wz_tooltip.js"></script>

<a href="index.htm" onmouseover="Tip('Some Text')">Startpage</a>

My problem is how to read the DESCR out of the bb-hosts file and then
integrate this in the html code.

Johann
list M.C.Z. Schoemaker · Fri, 20 Jul 2007 09:27:01 +0200 ·
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:user-e1e8215f7c0b@xymon.invalid)
Systems Programmer @ NLR ODIC (ICT/OS)
National Aerospace laboratory NLR
http://www.nlr.nl/
list Johann Eggers · Fri, 20 Jul 2007 10:18:32 +0200 ·
Hi Marco,

I'm very interested in what you've changed to make the tooltip working!

Many thanks in advance

Johann
quoted from M.C.Z. Schoemaker
-----Original Message-----
From: Schoemaker, M.C.Z. [mailto:user-e1e8215f7c0b@xymon.invalid]
Sent: Freitag, 20. Juli 2007 09:27
To: user-ae9b8668bcde@xymon.invalid
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

:)
quoted from M.C.Z. Schoemaker
--
Marco Schoemaker (mailto:user-e1e8215f7c0b@xymon.invalid)
Systems Programmer @ NLR ODIC (ICT/OS)
National Aerospace laboratory NLR
http://www.nlr.nl/

list M.C.Z. Schoemaker · Fri, 20 Jul 2007 10:54:32 +0200 ·
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
list Johann Eggers · Fri, 20 Jul 2007 11:02:56 +0200 ·
There are no attachements to this mail.

Best would be to make a patch file. 

Thanks
quoted from M.C.Z. Schoemaker
Johann
-----Original Message-----
From: Schoemaker, M.C.Z. [mailto:user-e1e8215f7c0b@xymon.invalid]
Sent: Freitag, 20. Juli 2007 10:55
To: user-ae9b8668bcde@xymon.invalid
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

list M.C.Z. Schoemaker · Fri, 20 Jul 2007 11:14:30 +0200 ·
quoted from Johann Eggers
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
quoted from Johann Eggers
.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
list Henrik Størner · Fri, 20 Jul 2007 12:31:45 +0200 ·
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
quoted from Johann Eggers

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.
list Henrik Størner · Fri, 20 Jul 2007 13:33:06 +0200 ·
quoted from Johann Eggers
On Thu, Jul 19, 2007 at 03:00:42PM +0200, Johann Eggers wrote:
I like the functionality that when you hook the mousepointer over a dot
a small box pops up and displays information in the form
column:color:duration.

I (and also a lot of people in my company) would like to see this also
for the hostname links. If a DESCR tag is in the bb-hosts file for this
host it's content should be displayed in the little pop-up box. This way
it's not necessary to view the info column each time to get this info.
OK, thanks to Marco Schoemaker's hint on how to do this in HTML,
I've cooked up a patch that should do this.

Unlike Marco, I don't want to introduce yet another special tag for
the tooltip. It will display the COMMENT text, or the DESCR text 
if there's no COMMENT defined. If neither exists, it will just
display the hostname.

The attached patch is based on the current snapshot, but modified so
it should work with Hobbit 4.2.0. Those on the bleeding edge version
will have to wait for tonights snapshot.


Regards,
Henrik
Attachments (1)
list Johann Eggers · Fri, 20 Jul 2007 14:31:31 +0200 ·
quoted from Henrik Størner
-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Freitag, 20. Juli 2007 13:33
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Feature request: DESCR popup

On Thu, Jul 19, 2007 at 03:00:42PM +0200, Johann Eggers wrote:
I like the functionality that when you hook the mousepointer over a
dot
a small box pops up and displays information in the form
column:color:duration.

I (and also a lot of people in my company) would like to see this
also
for the hostname links. If a DESCR tag is in the bb-hosts file for
this
host it's content should be displayed in the little pop-up box. This
way
it's not necessary to view the info column each time to get this
info.
OK, thanks to Marco Schoemaker's hint on how to do this in HTML,
I've cooked up a patch that should do this.

Unlike Marco, I don't want to introduce yet another special tag for
the tooltip. It will display the COMMENT text, or the DESCR text
if there's no COMMENT defined. If neither exists, it will just
display the hostname.

The attached patch is based on the current snapshot, but modified so
it should work with Hobbit 4.2.0. Those on the bleeding edge version
will have to wait for tonights snapshot.


Regards,
Henrik
Thanks a lot for this very quick implementation!!

I've tried it at my test system and it works perfect. Exactly what I had
in mind when writing my mail to the list.

This (and all the others in the past) is a pretty good example of how
flexible, quick and uncomplicated open source development is; espacially
compared to commercial products.

Thanks again for all the contribution!

Regards
Johann
list Johann Eggers · Fri, 20 Jul 2007 15:05:09 +0200 ·
quoted from Johann Eggers
OK, thanks to Marco Schoemaker's hint on how to do this in HTML,
I've cooked up a patch that should do this.

Unlike Marco, I don't want to introduce yet another special tag for
the tooltip. It will display the COMMENT text, or the DESCR text
if there's no COMMENT defined. If neither exists, it will just
display the hostname.

The attached patch is based on the current snapshot, but modified so
it should work with Hobbit 4.2.0. Those on the bleeding edge version
will have to wait for tonights snapshot.


Regards,
Henrik
Thanks a lot for this very quick implementation!!

I've tried it at my test system and it works perfect. Exactly what I
had
in mind when writing my mail to the list.
One little problem:

It's not working for the bb2 page.
There the DESCR is displayed next to the hostname. No <span ...  >
</span> tag in the html source.

Johann
list Giovanni - Gestor Redix · Fri, 20 Jul 2007 15:43:30 -0300 ·
Hi Henrik,
    I've applied the patch using 4.2.0 + all-in-one and added COMMENT or 
DESCR flag under bb-hosts but no comment appears after the hostname... 
any idea why ?

    Anyone had problem applying this patch ?

Giovanni M. Frainer - Gestor
Profissional Certificado LPIC-1
Redix - Gestão em T.I. com Software Livre
http://www.redix.com.br - user-5105202f6a95@xymon.invalid
Tel. Coml.: +55 (47) 3323-7313
Tel. Cel.:  +55 (47) 8401-6040
quoted from Johann Eggers


Henrik Stoerner wrote:
On Thu, Jul 19, 2007 at 03:00:42PM +0200, Johann Eggers wrote:
  
I like the functionality that when you hook the mousepointer over a dot
a small box pops up and displays information in the form
column:color:duration.

I (and also a lot of people in my company) would like to see this also
for the hostname links. If a DESCR tag is in the bb-hosts file for this
host it's content should be displayed in the little pop-up box. This way
it's not necessary to view the info column each time to get this info.
    
OK, thanks to Marco Schoemaker's hint on how to do this in HTML,
I've cooked up a patch that should do this.

Unlike Marco, I don't want to introduce yet another special tag for
the tooltip. It will display the COMMENT text, or the DESCR text 
if there's no COMMENT defined. If neither exists, it will just
display the hostname.

The attached patch is based on the current snapshot, but modified so
it should work with Hobbit 4.2.0. Those on the bleeding edge version
will have to wait for tonights snapshot.


Regards,
Henrik

  
list Henrik Størner · Fri, 20 Jul 2007 23:11:01 +0200 ·
quoted from Johann Eggers
On Fri, Jul 20, 2007 at 03:05:09PM +0200, Johann Eggers wrote:
One little problem:

It's not working for the bb2 page.
There the DESCR is displayed next to the hostname. No <span ...  >
</span> tag in the html source.
I did that on purpose, actually.

There are quite a few people who have the BB2 or NK/Critical systems view 
up on a large screen someplace where everyone can see it - but moving
the mouse is not possible, because you're too far away from the screen.
So on those pages I've kept the comment visible instead of using a
tooltip.


Regards,
Henrik
list Johann Eggers · Mon, 23 Jul 2007 11:44:36 +0200 ·
quoted from Henrik Størner
-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Freitag, 20. Juli 2007 23:11
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Feature request: DESCR popup

On Fri, Jul 20, 2007 at 03:05:09PM +0200, Johann Eggers wrote:
One little problem:

It's not working for the bb2 page.
There the DESCR is displayed next to the hostname. No <span ...  >
</span> tag in the html source.
I did that on purpose, actually.

There are quite a few people who have the BB2 or NK/Critical systems
view
up on a large screen someplace where everyone can see it - but moving
the mouse is not possible, because you're too far away from the
screen.
So on those pages I've kept the comment visible instead of using a
tooltip.
What's about making this an option.
E.g. in hobbitserver.cfg a new variable can control it:

BB2TOOLTIP=TRUE or FALSE

This way you can decide for yourself whether the information is
displayed on the page or as a tooltip.


Regards
Johann
list T.J. Yang · Mon, 23 Jul 2007 09:22:50 -0500 ·
Can someone define what is hobbit tooltip ? I will include the answer an FAQ 
on hobbit wiki FAQ.


T.J. Yang
quoted from Johann Eggers

From: "Johann Eggers" <user-769b09132207@xymon.invalid>
Reply-To: user-ae9b8668bcde@xymon.invalid
To: <user-ae9b8668bcde@xymon.invalid>
Subject: RE: [hobbit] Feature request: DESCR popup
Date: Mon, 23 Jul 2007 11:44:36 +0200

-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Freitag, 20. Juli 2007 23:11
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Feature request: DESCR popup

On Fri, Jul 20, 2007 at 03:05:09PM +0200, Johann Eggers wrote:
One little problem:

It's not working for the bb2 page.
There the DESCR is displayed next to the hostname. No <span ...  >
</span> tag in the html source.
I did that on purpose, actually.

There are quite a few people who have the BB2 or NK/Critical systems
view
up on a large screen someplace where everyone can see it - but moving
the mouse is not possible, because you're too far away from the
screen.
So on those pages I've kept the comment visible instead of using a
tooltip.
What's about making this an option.
E.g. in hobbitserver.cfg a new variable can control it:

BB2TOOLTIP=TRUE or FALSE

This way you can decide for yourself whether the information is
displayed on the page or as a tooltip.


Regards
Johann

Local listings, incredible imagery, and driving directions - all in one 
place! http://maps.live.com/?wip=69&FORM=MGAC01
list David Honey · Mon, 30 Jul 2007 15:06:26 +1000 ·
I would also like it to be optional as we use comments for a quick view of 
which site the system is on.


ie BB2TOOLTIP=TRUE or FALSE

Cheers


"Johann Eggers" <user-769b09132207@xymon.invalid> 
23/07/2007 07:44 PM
Please respond to
user-ae9b8668bcde@xymon.invalid


To
<user-ae9b8668bcde@xymon.invalid>
cc
quoted from T.J. Yang

Subject
RE: [hobbit] Feature request: DESCR popup

-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Freitag, 20. Juli 2007 23:11
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Feature request: DESCR popup

On Fri, Jul 20, 2007 at 03:05:09PM +0200, Johann Eggers wrote:
One little problem:

It's not working for the bb2 page.
There the DESCR is displayed next to the hostname. No <span ...  >
</span> tag in the html source.
I did that on purpose, actually.

There are quite a few people who have the BB2 or NK/Critical systems
view
up on a large screen someplace where everyone can see it - but moving
the mouse is not possible, because you're too far away from the
screen.
So on those pages I've kept the comment visible instead of using a
tooltip.
What's about making this an option.
E.g. in hobbitserver.cfg a new variable can control it:

BB2TOOLTIP=TRUE or FALSE

This way you can decide for yourself whether the information is
displayed on the page or as a tooltip.


Regards
Johann
 

************************************************************************

      IMPORTANT -

(1) The contents of this email and its attachments may be confidential
      and privileged. Any unauthorised use of the contents is expressly
      prohibited. If you receive this email in error, please contact us,
      and then delete the email.

(2) Before opening or using attachments, check them for viruses and
     defects. The contents of this email and its attachments may become
     scrambled, truncated or altered in transmission.  Please notify us
     of any anomalies.

(3) Our liability is limited to resupplying the email and attached files
     or the cost of having them resupplied.

(4) We collect personal information to enable us to perform our
     functions. For more information about the use, access and
     disclosure of this information, refer to our privacy 
     policy at our website.

(5) Please consider the environment before printing.
************************************************************************