Xymon Mailing List Archive search

Feature request: DESCR popup

list Tod Hansmann
Thu, 19 Jul 2007 11:34:17 -0600
Message-Id: <user-62089123483a@xymon.invalid>

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


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