How can I get node-red to detect that the dashboard UI page has been visited, i.e. someone is looking at the page.
I say this be cause I would then send more frequent updates to the dashboard then when no one is visiting. i know i can implement a Websockets, but then this will be a page that i create not the dashboard UI
I have looked everywhere, and in forums, no solutions offered besides
create a custom webpage
The ui_control node can be used to emit messages when this happens.
From the info sidebar for the ui_control node:
When any browser client connects or loses connection, or changes tab, this node will emit a msg containing:
payload - connect, lost, or change.
socketid - the ID of the socket (this will change every time the browser reloads the page).
socketip - the ip address from where the connection originated.
tab - the number of the tab. (Only for 'change' event).
name - the name of the tab. (Only for 'change' event).
Related
I'm applying a category using graph client but sometimes (when I apply category for multiple messages in quick succession) it's not visible in the UI. When I do a get call for the message using graph client, I can see the category but it never shows up in outlook UI.
I've tried outlook/computer restart but no luck.
I've tried to extend my chatbot with salesforce live agent api. So I've implemented all the process, and chat works correct, except one thing - It won't work on multiple tabs. When one tab have long polling connection (left side on the screenshot), and I open new tab (right side) - old tab (left) receive:
409 Conflict
Duplicate Message Observer
Is it possible, and can I use multiple tabs with salesforce long polling connection on my online shop? (it is general situation, when customer has many tabs, and each of them should be with the same chat)
I use salesforce Messages api endpoint: https://developer.salesforce.com/docs/atlas.en-us.live_agent_rest.meta/live_agent_rest/live_agent_rest_Messages.htm
You can't work with multiple tabs on the Salesforce. You can make the backend part, where you can make a locker. (only one request pass to the SF, but all other waits for the master-request
I have a requirement of maintaining chat history and loading them back in a window after a page refresh or close and opening of the window.
ISSUE : Buttons/carousel/Adaptive cards/Hero Cards events/ properties are not loading (ie; when I click on button or any event, actions are not happening).
DESCRIPTION:
In order to achieve the requirement i had 2 options.
BotFramework _ Directline JS
I guess using this we can only get conversation history and where we couldn't load back the conversation history in chat window.
Though we can get the conversation history we have to send all the messages to bot again.
So i had opted 2nd one.
Store the html controls and Load it in the bot div: When sending or receiving message action is happening from bot am storing the html controls(i.e; controls under wc-message-groups class in local storage) and binding back to the div on page load if data exists.
This works for me to show conversation history in a chat window. But I am not able to get the events/actions for buttons.
Can we do this with Directline JS or is there any option to load properties/events to controls?
Please help me with this issue.
Thanks in Advance
I would start by taking a look at this thread out the Webchat GitHub repo. There is a good discussion going on about how this may be accomplished.
I also created this project in C# using webchat which will provide chat history in the webchat control. The project uses this pull request branch which you would also need to use. Hope this helps, good luck.
To replicate:
Open two github tabs on which you're both logged in
Log out of one tab.
At the top of the 2nd tab you almost immediately get notification that you logged out on another tab
I've been trying to figure out how this works. Since the notification is almost immediate I considered 3 possibilities:
Each tab makes XHR/AJAX requests on a schedule to check session validity with the server (or uses long polling)
Each tab registers an event listener to Server Sent Events, and receives notification from the server upon logout.
Each tab has a websocket connection to the server, and receives a similar notification.
For reference, these technologies are discussed here. I am stumped though because when I open the web browser's (Firefox 48 beta) network requests dev tool, I see no communication on the tab that shows the notification between the time I log out of the other tab, and the time the notification appears.
By the way, the notification works in the opposite direction as well. If you have two tabs logged out, and you log into one of them, a notification immediately pops up on the other tab that you logged in. What's going on?
Github uses Local Storage for this trick. It uses entry with key 'logged-in'. This key is either true or false and is set each time user logs in/out. Each tab constantly check (as I know there is no event on Local Storage modification) Local Storage.
Background:
I'm having trouble figuring out why Disconnect is called from a hub that's not yet been initialized.
I have two different MVC views that creates different signal connections:
ListView (JS creates a connection to ListHub which does not implement IDisconnect)
DetailsView (JS creates a connection to DetailsHub which does implement IDisconnect)
When a user logs on, he/she is redirected to the ListView where a javascript creates a connection to the ListHub so that the page is aware of events that locks/unlocks items in the list. When the user clicks on an item, a signal is sent to the ListHub and the item is locked by the user. After that, I stop the click from doing the GET request by using event.preventDefault() and it works well.
The problem is...
Once the user leaves for another page - or if the page simply is reloaded - the Disconnect method of the DetailsHub is triggered. I don't get why this is happening. Remember, the ListHub is the only active hub thus far. No other Hubs or connections have been initialized. Still, this is the behavior I'm getting.
What I'm trying to achieve
What I'm trying to achieve here is to do something when Disconnect is raised/called on the DetailsHub. I want nothing to happen when the user disconnects from the ListHub.
It's written in signalR project's wiki:
Whenever a client disconnects, the Disconnect method will be invoked on all hubs that implement IDisconnect. When this method is called you can use Context.ConnectionId to access the client that disconnected.
https://github.com/SignalR/SignalR/wiki/Hubs