Page 2 of 2
Re: Long actions make browser hang
Posted: Tue Nov 18, 2014 3:28 pm
by WillemDH
Hmm not really what I was looking for. I can output to file, but I'm trying to find out what Ludmill meant to make ajax show the content of this logfile.
Grtz
Re: Long actions make browser hang
Posted: Tue Nov 18, 2014 4:42 pm
by sreinhardt
I'm sorry to jump in here without prior knowledge, but it sounds like you use the actions component, and when loading certain pages? or when using actions that take a long time? it hangs your browser?
If thats correct, it sounds to me like either the actions component directly has issues with waiting for a response, or that firefox does in particular. I cannot say I have seen this with nagios particularly, but I also don't use the actions component. However I have seen this with other web apps I use, and it seems to be a particular issues with FF's javascript engine not handling waits properly. That's not to soley point blame at FF, it's very possible we have issues that can be resolve as well. What I'm getting at, is if you haven't let's try chrome or *shudder* IE and see if any changes are had.
Also, it sounds like I don't need your particular script to emulate this, simply something that waits between 30-60 seconds before it responds to the script and provides actionable data for the browser to work with. Does that sounds correct?
Re: Long actions make browser hang
Posted: Wed Nov 19, 2014 9:31 am
by WillemDH
Spenser,
Just tested it and same issue with Chrome. Aft clicking the action, a new page is opened. the script starts updating all hosts in a hostgroup, outputting as text in the second tab, the status of each update. This can take up to 15 minutes, depending of how many hosts are in the hostgroup. In the meantime the tab where I initiated the action hangs, for as long as the action is running.
Don't get me wrong, I need to have the status of each update for each host in the webpage of the tab opened by the action. it's just very inconvenient that the original nagios XI webpage hangs.
Grtz
Willem
Re: Long actions make browser hang
Posted: Wed Nov 19, 2014 5:24 pm
by abrist
WillemDH wrote:it's just very inconvenient that the original nagios XI webpage hangs.
This is due to how it is coded. The javascript runs an ajax loop waiting for the command to finish. What you want is possible, but it was never part of the vision of this plugin. We call them "quick actions" for multiple reasons
The real issue is how to handle this. We could load the javascript into a different tab and let that tab hang until the script is complete. This will require a number of changes to the code, so you should most likely submit a feature request to tracker.nagios.com and our devs will get it on the list.
For now, you may want to refer to my earlier suggestion of using one action to start the script in the background with its output redirected to a file, and another to display the text from the file.
Re: Long actions make browser hang
Posted: Fri Dec 05, 2014 11:56 am
by WillemDH
Ok, thanks Andy. I made
http://tracker.nagios.com/view.php?id=626
You can close this thread.
Grtz
Re: Long actions make browser hang
Posted: Fri Dec 05, 2014 1:04 pm
by lmiltchev
Locking it.