PDA

View Full Version : Problem with the monitoring panel


mzicc
10-29-2007, 12:31 PM
Hi all!

I have a problem with the monitoring list.

This is my situation:
My plugin, performs its check, then produces a log file and returns a string in this form :

<a href="/logs/mylog.log">CRITICAL STATUS MESSAGE</a>

so that the user can download the file containing some useful information.

The first time I load the page, everything works. As soon as the page refreshes (or as soon as I click the refresh icon) I the following behaviour:

with Firefox: The status information column becames empty
With Internet Explorer: In the status information column I see a 'null' string


If I look through the page source, I see my string (<a href"......)

Do you know any workaround? I really need to show the link so that the user can download the file...

Many thanks in advance,
Massimiliano Ziccardi

mzicc
12-19-2007, 10:43 AM
Finally I've solved the problem. I'm quite disappointed, 'couse, after 2 months, NO-ONE did even try to help me (no people, no centreon developer).

The problem was in the file ajaxMonitoring.js: the Javascript read the value of the element containing the plugin_output with the following code:

line.getElementsByTagName("plugin_output")[0].firstChild.nodeValue;

But, if the output of the plugin is a link, the line.getElementsByTagName("plugin_output")[0] is not the plugin output, but is the <A> tag.

Attached you'll find the fixed JAVASCRIPT (just unzip it).

DonKiShoot
12-19-2007, 05:09 PM
GG !!!

Hope developper will be interested to integrate this modifications for next release of centreon.
Then it'll not be necessary to modify this piece of code a second time.

WAtt
12-19-2007, 06:12 PM
Hi,

Could you open a bug request on bugs.centreon.com ? :)

Thanks for this contrib :p

mzicc
01-09-2008, 01:21 PM
Done.
The bug is the FS#457.

I've been away for a while, so I couldn't do it before.

Attached you'll find an updated ajaxMonitoring.js that fixes a problem with Internet explorer.

Regards,
Massimiliano Ziccardi

julio
01-10-2008, 10:24 AM
It's ok on 1.4.2.2 I think...