Hi
I am trying to build an application using nodered
where there will be 4 user one is admin and other three are user1, user2, user3 .
Admin will be maintaining records of these 3 user like how many times these users have logged-in(count of login) in the table of the ui tabulator
and other user1, user2, user3 will be having their own things in dashboard like screw gauge, map, slider different user different things
this table is ui-tabulator from flowfuse dashboard
now when i click that particular user like user3 in tabulator
that particular user alone should go out from dashboard
I know that for this we have to remove socket_id of that particular user
and i can clearly see the socket id of each user in ui_base.js file
now the thing is onclick of one cell in tabulator how can I activate or trigger the socket.disconnet(socketid) or socketid.disconnect present in the ui_base.js file
Just a thought: how about sending a message to a template node on the to-be-killed dashboard page, telling it to kill itself gracefully? (e.g. with a window.close() command)
That only works if the window was "popped out" via JavaScript to start with (that is the simple explanation, search web for more detail). This is a security feature to prevent annoying sites messing with folk.
window.close() is ok, but i want to close the window of particular user that i select from admin table where all users are listed. That is the issue sir
Not sure I understand your issue, sir.
Every user dashboard (1, 2, and 3) will have hidden ui-template which listens to messages. Suppose the admin decides to close the window of user 2, it will send a message with '2' in it. This message will be ignored by the windows of users 1 & 3, while the window of user 2 will use JS to close itself.