Autorefresh grid with ajax / Intercept this call to get updates from 3rd party system

2
Hi guys, 1: I have a list of servers, with a status column 2: There is a scheduled event that refreshes the status of all servers in the Mendix-db (sending a list of servers to a 3rd party system to update the status) 3: In Mendix I have set the auto-refresh to 10 seconds to refresh the grid in Mendix I have a few questions on this Question 1: It is undesirable that the scheduled event (under 2) refreshes ALL server-records: it can be a very large amount! (like 50.000 servers or even much more in the future) What I'd like to have is that - Only those servers are refreshed that users are viewing. So if a user opens a page with 30 servers, an asynchronous request as to be done to the 3rd party system to retrieve the server-statuses and update the mendix-datagrid. Is this possible, and if so: how? In Mendix-terms I'd like to execute an update-microflow that accepts a list of servers (which are only the servers I'm viewing). In this microflow I update the statuses and this must be refreshed in my screen. If I use "paging": it must refresh the pages I'm navigating to (another async call to update these servers) I took a look at the microflow timer widget, but that has to be put in a dataview or templategrid. I think that this does not enable me to refresh the servers I'm currently looking at. How can I best implement this? Question 2: Why is the auto-refresh option deprecated? How can this be implemented in future versions (when this option is removed)? #edit: Of course I hope this can be realized without a feature request (to be able to use it asap). But a FR would be that a microflow-trigger on datagrids can be executed scheduled. I would then have a refresh microflow-button (that I would hide with css) and schedule this each 5? seconds. Additionally then it must be possible to add all records of the current datagrid page.
asked
2 answers
0

To answer question 2: You can use the Microflow Timer widget with the RefreshClass java action in the community commons.

answered
0

Perhaps you could use a virtual attribute for the server status? That way it is only calculated when someone is actually viewing the object, which in your case would reduce the number of status requests significantly (unless you have a very large number of concurrent users viewing this data).

answered