Skip to content

Add Chart Conversion#46

Open
kd9lsv wants to merge 6 commits intoFlowFuse:mainfrom
kd9lsv:ui_chart
Open

Add Chart Conversion#46
kd9lsv wants to merge 6 commits intoFlowFuse:mainfrom
kd9lsv:ui_chart

Conversation

@kd9lsv
Copy link
Contributor

@kd9lsv kd9lsv commented Sep 25, 2024

Description

Added ui-chart conversion to migration server. Please review. If accepted additional nodes will be submitted for PR.

Related Issue(s)

Closes #27

Checklist

  • [Y] I have read the contribution guidelines
  • [N/A] Suitable unit/system level tests have been added and they pass
  • [Y] Documentation has been updated
    • [N/A] Upgrade instructions
    • [Y] Configuration details
    • [Y] Concepts
  • [N/A] Changes flowforge.yml?
    • [N/A] Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • [N/A] Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production

Labels

  • [N/A] Includes a DB migration? -> add the area:migration label

@kd9lsv
Copy link
Contributor Author

kd9lsv commented Oct 4, 2024

@joepavitt Do you have any thoughts on this PR?

@joepavitt
Copy link
Contributor

joepavitt commented Oct 4, 2024

Thanks, for tagging me @kd9lsv, for some reason I didn't get notified this had been opened. I really appreciate the efforts in putting this together.

I'll take a proper look later today, but will mention that for the Chart node, the biggest concern isn't the chart node itself, but the bit before the chart node, given that we do not support the same data structure as in Dashbpard 1.0, user's flows would be sending in data that isn't compatible.

A solution here could be that we replace ui_chart with ui-chart and a function node, that parses the known data structure of Dashboard 1.0, and converts it to something D2.0-friendly?

@kd9lsv
Copy link
Contributor Author

kd9lsv commented Oct 5, 2024

@joepavitt

I'll take a proper look later today, but will mention that for the Chart node, the biggest concern isn't the chart node itself, but the bit before the chart node, given that we do not support the same data structure as in Dashboard 1.0, user's flows would be sending in data that isn't compatible.

The same object input works for me.
The update allows for more things not less.

The only thing that I believe doesn't work directly is the clearing of the chart using []. A function node would be need to be added to complete functionality.
Example function

if (msg.payload=='[]'){
   msg.action="Replace";
   msg.payload="";
}
return msg;

See flow
image

See Dashboard result
image

ui_chart_ping_internet.json

@kd9lsv kd9lsv mentioned this pull request Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Node: UI Chart

2 participants