New feature: Node Usage Analyzer #2152
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey folks,
Per issue #2101, I've added the feature in question.
This code adds a new option, "Node Usage Analyzer", to the main Manager dialog. This dialog will show you the number of workflows in your user directory and subdirectories which reference each installed node package. Clicking the number will tell you which workflows, and how many nodes from that package each workflow is using.
It does this by adding a new API handler, which scans through all workflows in the user directory, and returns a list of JSON objects containing the
workflow_file_name, and a list of objects for each unique nodetypein the workflow, and theircnr_idandverif present.The work of matching nodes to node-packs is done in the front-end, using the existing logic from
custom-nodes-mnager.js. Since there was some overlap between dialogs, I moved some shared functionality intocommon.js.Full disclosure: while I wrote the back-end code myself, the majority of the Javascript/CSS for the front-end was written by Claude since I'm very far from an expert in front-end development. I reviewed the code and it looks good to me, but again - not an expert.
Let me know if there's any changes I should make!