Hi @solanus - thanks for your question. Vuetify components have the MIT License which is a very generous and flexible license permitting free of charge use in commercial settings.
Seperately, I know you get this question ad nauseam but when do you think youâll have tags enabled for template nodes? I used the circular progress component to make a gauge but need the tag to increase the font size appropriately for the numeric value in the middle.
Hoping to start work on that this week. Weâre just pushed a major update to third-party integrations which affected that a lot, so needed to tread carefully. Itâs not going to be a trivial piece of work, so difficult for me to say when it will be delivered.
Thanks Joe!
Let me join @solanus with eager anticipation for the ability to add a JavaScript section in the template node, so that I can move from Dashboard 1.0 to 2.0.
The JS just needs to:
Provide handler functions to UI events (e.g. button click, drop-list select etc.)
Enable to send & receive msg objects (for current user only, as well as for all users)
I started playing with it, and it looks great. I have a few questions:
When using this.send(), I see that the provided data (primitive or object) is always set into the payload property of the output message. Yet if I send an object which has a payload property, only that property is being extracted & sent. What is the logic here? Also, what value goes into topic?
How can I stop an incoming msg to be automatically forwarded to the output port? (for cases where I want to receive a msg via $socket.on(), process it and then discard it). In Dashboard 1.0 there was a checkbox for this in the node configuration.
What is the scope of the socket id? (is it per page or per a connected browser with multiple pages?)
Dashboard 1.0 templates support multi-user by checking the socket id (accepting only messages with same, or without, socket id). I can easily check this myself on incoming messages but would propose adding this option (of discarding messages with a different socket id) as a node-configuration checkbox.
I have listed this in our migration document - not got round to adding that feature yet, but itâs on the list as Issue 354
Itâs defined as a single Socket connection. This would be unique per Browser tab, but would actually reset on page refresh too, as that disconnects the socket. Iâm working with Julian, developer of UI Builder, where we plan on agreeing on a set of âstandardsâ for being able to map, more consistently, which user/client is connected at any given time - see our notes here
Given itâs fairly easy in the ui-template to do this check atm, Iâm not likely to be in a rush to add this myself to the core repo (although all contributions are welcome). However, I donât want to lose the idea in this forum, could you create an issue on our GitHub repo please?
Itâs great to hear that you & Julian are concluding the standards, which would allow consistent multi-user behavior.
I asked the above question since currently, when moving between pages (while staying on the same browser tab), if I use the dashboardâs side-menu the socket id does not change, but if I specify the new page URL (in the browserâs address bar), it goes there with a new socket id. Is this by design?
Something similar also happens to me, but only when the browser console is open (due to the browserâs debugger pausing on a few recoverable load errors). Clicking âresumeâ will eventually load the page and continue to operate correctly.
If the console is not open, refresh works with no issue.
This is a limitation of how WebSocket connections work, and until we come up with our own clientid standard that we store in localstorage for example, itâll continue to be the way.
WebSocket client disconnects when a full page is refreshed/navigated way. We use VueJS, which is a âsingle-page applicationâ, so when youâre navigating between pages using the left-side navigation, in fact VueJS doesnât refresh/reload the page, it re-builds the content in front of you and just updates the URL in the browser, allowing it to maintain state.
Yes, exactly. I understand there is some limitation to send a full msg object - maybe the framework can stringify/parse it?
The current behavior is like this:
Sending an object which has a payload property will output this payload (+ an empty topic property), while discarding all other properties (including the original topic property)
Sending an object without a payload property - will output this object within a payload property of the output msg
So currently my workaround is to use the second method, i.e. ensure we donât specify a payload property, and extract the msg object from the output payload.