Data passed by functions to dashboard2

Hi all,
I'm migrating my flows from dashboard-1 to dashboard-2.
Previously, I was preparing some data to visualize from a function and use them on a widget.
For example on a function I prepare msg.label and on the label field of chart node I issue {{msg.label}}.
Actually, on dashboard-2, the "{{msg.label}}" is the text to visualize on the chart and not the data contained in the variable.
Is it possible to manage this in a future release of Dashboard-2?

It's one of the most requested features we have: Programmatic (Mustache) Titles & Labels · Issue #555 · FlowFuse/node-red-dashboard · GitHub

However, the {{ }} method, when directly applied to a node/widget property, is full of security vulnerabilities, so we are in the process of working on an alternative.

The first iteration of this opened today: UI Text - Support HTML injection by joepavitt · Pull Request #1046 · FlowFuse/node-red-dashboard · GitHub

It would use Node-REDs "template" node, and then each node is being updated to allow overriding of properties at runtime using msg.ui_update._<property>

The use of NR's template has the advantage also of being able to access the global and flow context stores too, and is less prone to security vulnerabilities

It should be perfect.
The "problem" is that the property "label" actually doen't permt to be dynamic. So I don't know how I can do what I need.

We are working through all of the widgets as we speak: Modify/Update UI-widget parameters from external · Issue #833 · FlowFuse/node-red-dashboard · GitHub

Should only be a couple of weeks

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