PDA

View Full Version : Feature Request: Use JavaScript for autorefresh


cameronsto
11-03-2006, 19:13
I'd like to be able to enable/disable the autorefresh of some of the Graphs and Screens within Zabbix so that I can study the pages longer than the autorefresh lasts. This could be done by using JavaScript to control the page refresh instead of the meta tag that is used today. Using JavaScript you could also have a checkbox on the page that could be used to enable/disable the timer. It could also have the potential of allowing a textbox on the page that the user could set a custom refresh in.

I've attached a "proof of concept" that does just this. It's a simple html page with a timer that starts when the page loads. After the time is up, if the checkbox is checked the page will reload. If the checkbox is unchecked the page will not reload. Furthermore, if the checkbox is changed, then it resets the timer. This allows someone to disable the timer, check the page for however long they need to, then re-enable the timer by checking the checkbox again.

Any thoughts or suggetions?

-cameron

Nate Bell
13-03-2006, 18:12
This sounds like a great feature to me. If it was implemented the way you describe, then all of the monitoring pages could have the option to automatically refresh, but some would default to not refreshing (overview page, latest values), and others could be set to refresh by default (graphs, screens). That way, you can set your latest values page to refresh automatically if you want, but it won't by default.

Not sure how Alexi feels about adding javascript to Zabbix, but using it could probably lead to some interesting GUI features.

Nate

YuriV
14-03-2006, 19:56
What would be sick would be adding ajax so the page dosent even refresh at all. it would just do an xml call and fetch the data. would require more skills than i have unfortunatly, but the demos i have seen are awesome.