Hello,
For front purposes (I'm building a dashboard using the JS framework), I want to synchronize all my searches so that they start at the same time.
But the refresh countdown seems to start when a search GET the results, so if it takes longer, it is delayed from the other searches of the dashboard (which have the same refresh time though).
=> Do you know if there is a simple way to make searches start at the very same time (I don't care if they get results at different time) ? Or do I have to use JS timers ?
Thanks for your help 🙂
Guillaume
Just to clarify, you want all searches on your dashboard to refresh at the same time? How are you restarting them at the moment, does each panel have a refresh? You may want to change the refresh type of your panels from delay
to interval
then. That changes the refresh timer from its default method which waits the given time after the search is done to the method that waits the given time from when the search is dispatched.
Alternatively, you could remove the panel-based refresh entirely and make your entire dashboard refresh like this:
<dashboard refresh="30">
<label>Dashboard title</label>
...
The docs for this topic are here, search for occurences of refresh.
Just to clarify, you want all searches on your dashboard to refresh at the same time? How are you restarting them at the moment, does each panel have a refresh? You may want to change the refresh type of your panels from delay
to interval
then. That changes the refresh timer from its default method which waits the given time after the search is done to the method that waits the given time from when the search is dispatched.
Alternatively, you could remove the panel-based refresh entirely and make your entire dashboard refresh like this:
<dashboard refresh="30">
<label>Dashboard title</label>
...
The docs for this topic are here, search for occurences of refresh.
Hello,
And thanks for you reply ! You got it, I'm going to use interval instead of delay.
Thanks a lot, I was lost in the doc and you've saved me 🙂
You're welcome. The Simple XML reference is indeed a massive document, if you don't know what to look for it's easy to get lost there.
It is, but what I didn't mention is that I'm using the Search Manager from the JS framework !
So I didn't thought to check the XML properties first, and thanks to you I realized that almost the same properties are included in the SearchManager (by looking in the JS attributes of the search), but are not in the documentation.
But it seems that it's not working, even with the refreshtype : interval, my searches are still triggering the refresh time when they are done... Maybe it is not implemented yet ?
Thanks for your help ! 🙂
The documentation for the js framework is... shorter than the Simple XML reference. If you're in js, why don't you leave the searches as non-refreshing searches and restart them from a for
-loop? Seems simpler than finding something that may work or not and may or may not be documented somewhere.
It is, definitely 😄
Yes, it's a great idea, but I wanted to check first if there wasn' t a "best practice" way to do it, in order to produce a code more maintainable, in vain apparently !
Thanks, I'm going to do this, as I'm already branched to the "search:done" events of all my searches 🙂
Thanks a lot, Jeff, you have been a big help 🙂