How to determine if a dashboard tab is active or not

  • when user logins, After logging in to the dashboard some time, i want to check if user is still active or not in the dashboard.
  • How to check?
  • In case of active or inactive state, I want console message to be printed

How can I achieve this?

The UI Event node triggers on page views and leave, but not too sure I understand your definition of "active", I think you're classifying just the tab being open and not active?

@joepavitt
"When I log in and set the expire time, if the user interacts with the dashboard, I need to extend the expire time. That's why I need to track the dashboard's status to determine if the user is interacting or not."

  • I tried "ui_control" but the node only responded when i changed the dashboard page
  • How to check If "mywindow" on dashbord pageof the browser
  • If I am on dashbord tab user is active, if i switch another tag, user is inactive ?

Switching to a different tab in a browser does not immediately disconnect the tab from the server, it will stay active until the browser decides to put it to sleep, which could be hours. The browser does that so that if you switch back it will immediately show the latest data without having to refresh the page. I don't think that node-red has any way of knowing that you have switched to a different tab in the browser.

I am trying ,

  • Expiration time is set to 5 minutes and can be extended by another 5 minutes if the user interacts with an "dashboard," like a mouse move, keydown, or click
  • Last 4th minutes, I want to check this mouse move, keydown, or click actions

Currently, the ui-event node is only tracking page changes rather than auditing every single interaction on the Dashboard.

Each node will obviously emit upon interaction/submissions/clicks, so you could do a link node after each of the relevant UI nodes that link to a single "track interaction" type workflow?