FlowFuse / FlowFuse/node-red-dashboard

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

Open
#754 4 comments 0 reactions 0 assignees View on GitHub
needs-triage type:bug
Dominant language
HTML
Stars
355
Forks
82
Avg merge
4d 23h
Merged PRs (30d)
24

Description

### Current Behavior

The usage counter of the config node is shown as 0
![Bildschirmfoto vom 2024-04-06 17-13-14](https://github.com/FlowFuse/node-red-dashboard/assets/31366299/64b697f8-9f30-4b71-88a2-e4c13b9b2c1f)
and the config node is reported as unused
![Bildschirmfoto vom 2024-04-06 17-13-53](https://github.com/FlowFuse/node-red-dashboard/assets/31366299/fdfd589b-0601-4d34-be2c-0e31562c93f1)

### 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

- Dashboard version: 1.7.0
- Node-RED version: 4.0.0 beta1
- Node.js version:
- npm version:
- Platform/OS:
- Browser: Firefox

### Have you provided an initial effort estimate for this issue?

I am not a FlowFuse team member

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.