We are all familiar with the issue of a flow being shared in the forum without any information about what it contains. It isn't easy to stare at the JSON to figure these things out. In particular, the question over what contrib nodes it depends on.
I've put together an experimental page in the flow library to try to help. You paste in the flow and it gives back a report about what the flow contains. It looks up each node type to say which module it comes from.
https://flows.nodered.org/inspect
For example, pasting in this flow (picked at random), you get:
Flows: 1
Subflows: 1
Nodes: 35
Type | Count | Module
-------------------------|-------|-------------------
comment | 2 | @node-red/nodes
debug | 1 | @node-red/nodes
function | 12 | @node-red/nodes
inject | 3 | @node-red/nodes
schedex | 1 | node-red-contrib-schedex
ui_group | 1 | node-red-dashboard
ui_button | 3 | node-red-dashboard
ui_switch | 7 | node-red-dashboard
ui_tab | 1 | node-red-dashboard
ui_text_input | 2 | node-red-dashboard
ui_toast | 1 | node-red-dashboard
subflow:3abe8c84.455934 | 1 |
Modules:
- node-red-contrib-schedex
- node-red-dashboard
When a node type is provided by multiple modules it does try to infer the right one. For example, above you can see node-red-dashboard is listed. Some of those ui_xyz
nodes are provided by multiple modules that have cloned dashboard. However only ui_group
is provided by node-red-dashboard
, so the code infers it must be the module providing the others.
This is a quickly hacked together idea, I'm sure there's more it could do. Ideas/contributions etc are welcome.
Here's the code for the page: https://github.com/node-red/flow-library/blob/master/template/flowInspector.html