FlowFuse / node-red-dashboard

https://dashboard.flowfuse.com
Apache License 2.0
205 stars 49 forks source link

SubFlow is not counted for config node `ui-group` usage #754

Open m-schaeffler opened 7 months ago

m-schaeffler commented 7 months ago

Current Behavior

The usage counter of the config node is shown as 0 Bildschirmfoto vom 2024-04-06 17-13-14 and the config node is reported as unused Bildschirmfoto vom 2024-04-06 17-13-53

Expected Behavior

The subflows are counted for the usage of the config node and no config node is reported as unused.

Steps To Reproduce

You have a SubFlow with a ui-text widget inside and use it a ui-group which contains only widgets that are inside SubFlows.

Test-Flow:

[{"id":"37c88dbd6ff23f49","type":"subflow","name":"formatNum","info":"","category":"","in":[{"x":60,"y":100,"wires":[{"id":"32f67f684d9271cf"}]}],"out":[],"env":[{"name":"Group","type":"ui-group","value":"","ui":{"icon":"font-awesome/fa-table","label":{"de":"Group"},"type":"conf-types"}},{"name":"width","type":"num","value":"0","ui":{"icon":"font-awesome/fa-arrows-h","label":{"de":"Breite"},"type":"input","opts":{"types":["num"]}}},{"name":"property","type":"str","value":"payload","ui":{"icon":"font-awesome/fa-ellipsis-h","label":{"de":"Eigenschaft"},"type":"input","opts":{"types":["str"]}}},{"name":"unit","type":"str","value":"","ui":{"icon":"font-awesome/fa-plus","label":{"de":"Einheit"},"type":"input","opts":{"types":["str"]}}},{"name":"digits","type":"num","value":"0","ui":{"icon":"font-awesome/fa-angle-right","label":{"de":"Stellen"},"type":"input","opts":{"types":["num"]}}}],"meta":{},"color":"#5ad2dc","icon":"font-awesome/fa-dollar"},{"id":"84fd0592301ef0c7","type":"ui-text","z":"37c88dbd6ff23f49","group":"${Group}","order":1,"width":"${width}","height":0,"name":"","label":"${NR_SUBFLOW_NAME}","format":"{{msg.payload}}","layout":"row-spread","style":false,"font":"","fontSize":16,"color":"#717171","className":"","x":450,"y":100,"wires":[]},{"id":"32f67f684d9271cf","type":"formatNumber","z":"37c88dbd6ff23f49","name":"","property":"${property}","propertyType":"msg","unit":"${unit}","grouping":"'","decimal":",","digits":"${digits}","showState":false,"filter":false,"x":210,"y":100,"wires":[["84fd0592301ef0c7"]]},{"id":"88c627b70382d081","type":"tab","label":"Flow 3","disabled":false,"info":"","env":[]},{"id":"bae802577a1257f4","type":"subflow:37c88dbd6ff23f49","z":"88c627b70382d081","name":"Test","env":[{"name":"Group","value":"db4ae92a5230262b","type":""},{"name":"unit","value":"T","type":"str"}],"x":310,"y":200,"wires":[]},{"id":"ed5c52b345b7318e","type":"inject","z":"88c627b70382d081","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":200,"wires":[["bae802577a1257f4"]]}]

Environment

Have you provided an initial effort estimate for this issue?

I am not a FlowFuse team member

arturv2000 commented 6 months ago

+1 somewhat annoying, every time we perform a redeploy this warning comes up.

Quick workaround, add a template node and setup the style to hide it.

image

GogoVega commented 5 days ago

Should be fixed in https://github.com/node-red/node-red/pull/4947.