We've moved to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.

Go to the Answer Hub

[Nagios-devel] Patch: statusmap popups with mozilla

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

[Nagios-devel] Patch: statusmap popups with mozilla

Postby Guest » Wed Apr 17, 2002 7:42 am

Hi,

here is a patch against statusmap.c from nagios-1.0a7 to enable the
host-popups with mozilla.

Long live the lizard!

Have fun,
bkw


--- cgi/statusmap.c.orig Tue Feb 26 05:03:34 2002
+++ cgi/statusmap.c Wed Apr 17 17:22:55 2002
@@ -2293,23 +2293,27 @@
printf("function showPopup(text, eventObj){\n");
printf("ieLayer = 'document.all[\\'popup\\']';\n");
printf("nnLayer = 'document.layers[\\'popup\\']';\n");
+ printf("moLayer = 'document.getElementById(\\'popup\\')';\n");

- printf("if(!(document.all||document.layers)) return;\n");
+ printf("if(!(document.all||document.layers||document.documentElement)) return;\n");

- printf("if(document.all) document.popup=eval(ieLayer);\n");
- printf("else document.popup=eval(nnLayer);\n");
+ printf("if(document.all) { document.popup=eval(ieLayer); }\n");
+ printf("else {\n");
+ printf(" if (document.documentElement) document.popup=eval(moLayer);\n");
+ printf(" else document.popup=eval(nnLayer);\n");
+ printf("}\n");

printf("var table = \"\";\n");

- printf("if (document.all){\n");
+ printf("if (document.all||document.documentElement){\n");
printf("table += \"\";\n",background_color,border,padding);
printf("table += \"
\";\n");
printf("table += \"\";\n",padding);
printf("table += \"\";\n",background_color);
printf("table += \"
\" + text + \"
\"\n");
printf("document.popup.innerHTML = table;\n");
- printf("document.popup.style.left = eventObj.x + %d;\n",x_offset);
- printf("document.popup.style.top = eventObj.y + %d;\n",y_offset);
+ printf("document.popup.style.left = (document.all ? eventObj.x : eventObj.layerX) + %d;\n",x_offset);
+ printf("document.popup.style.top = (document.all ? eventObj.y : eventObj.layerY) + %d;\n",y_offset);
printf("document.popup.style.visibility = \"visible\";\n");
printf("} \n");

@@ -2339,9 +2343,9 @@
printf("}\n");

printf("function hidePopup(){ \n");
- printf("if (!(document.all || document.layers)) return;\n");
+ printf("if (!(document.all || document.layers || document.documentElement)) return;\n");
printf("if (document.popup == null){ }\n");
- printf("else if (document.all) document.popup.style.visibility = \"hidden\";\n");
+ printf("else if (document.all||document.documentElement) document.popup.style.visibility = \"hidden\";\n");
printf("else document.popup.visibility = \"hidden\";\n");
printf("document.popup = null;\n");
printf("}\n");





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: bkw@weisshuhn.de
Guest
 

Return to Community Support

Who is online

Users browsing this forum: No registered users and 8 guests