Start flow on pageload

Wondering if it's possible to start a flow when the UI dashboard is loaded on a browser?

I want to call an API when the dashboard loads up, so that it can grab the latest status of something, and then display the result on the dashboard asynchronously. Note that I do not mean when Nodered itself loads (which can be done with an Inject node), I mean when the browser navigates to and loads the /ui route.

In addition, it is possible to see how many client browsers are connected? There's another API that I want to call every X minutes while users are connected, but only when there is 1 or more users currently on the dashboard /ui page

The ui-control node will output on page load/refresh.
You can also use it to log users when they connect or disconnect.

1 Like

Awesome! Yep, can see that now. Is there any way to get a list of all currently connected clients so that they don't have to be manually tracked?

No, the dashboard is not a multi user dashboard, so you would need to store the connected users in context and remove them when disconnected. You can then reference the context store to see how many are connected.

You may want to track the new dashboard which may do what you require, or add a feature request. Dashboard 2.0 Pre-Alpha Available


Will just echo that feature requests (and even PRs if you're that way inclined) are very welcome on Dashboard 2.0

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.