Hi, I'm getting started with <GoodData.CN>. I'd l...
# gooddata-ui
e
Hi, I'm getting started with GoodData.CN. I'd like to ask: once I embed a dashboard using react in a separate application, is it possible to have the dashboard refresh automatically? (e.g. new data is available every minute)
j
Hi, You can set your data to refresh whenever it’s loaded to the database as mentioned here: https://www.gooddata.com/developers/cloud-native/doc/2.2/connect-data/notification/
d
Hi, there currently is no functionality in the Dashboard component along the lines of “Re-evaluate all visualizations”. I guess the next best thing would be to change the
key
prop of the component periodically, but it will likely reload the whole Dashboard 😕 it is an interesting idea though, @Martin Ludvik WDYT?
e
Hi 🙂 @Joseph Heun that doesn't change React dashboards, unless the dashboard is reloaded. @Dan Homola I tried that, it does reload the whole dashboard. Everything disappears for one second.
would dispatching the command "request async render" help with this? I haven't been able to dispatch it yet, but I wonder if that's related to this functionality
d
Unfortunately no, the async render mechanism is used internally so that the exports to PDF work properly (it is to give custom visualizations the ability to say “wait for me exporter, I take a while to load and will let you know when I am ready”), mor info about that can be found here. We would have to add explicit support for this “widgets-only” refreshing as we would also need to cache-bust to not show results cached on the client.
👍 1
e
For the purpose I'm considering Gooddata, one of the requierments is emdeddable dashboards that can display real time data, do you think Gooddata cannot be used for this?
d
Out of the box the Dashboard component does not support this use case at this point 😞 I can imagine some sort of local Dashboard plugin that would change the default widget implementation so that they have some setTimeout in them and trigger the execution periodically (even using the same
key
trick but on widget level). It would mean some extra development and maintenance on your side, though.
e
@Dan Homola doing it on the widget level would be better, but I don't think that's what our users expect, for the purposes we use dashboards. Ideally I it'd be great if embedded dashboards/widgets to update automatically soon after the server receives an update notification (https://www.gooddata.com/developers/cloud-native/doc/2.2/connect-data/notification/). Thank you for your responses! 🙂
👍 1