Closed
Conversation
When no nodes are selected, use wildcard ['*'] instead of empty array
to match the documented behavior ("No selected Nodes means All Nodes").
Fixes netdata/netdata-cloud#1132
Member
Author
|
@novykh check this |
Member
|
@ktsaou this wont fix it, since scope nodes are being sent to the cloud backend, where we use empty array for all nodes. If the backend was the agent then it would work. Please share what is braking so I can check it. |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
scope.nodes: [](empty array) to the Netdata Cloud API['*']when no nodes are selected, matching the UI tooltip behavior ("No selected Nodes means 'All Nodes' from the Room")Root Cause
In
src/shared/hooks/useGetChartData.ts, thenodesparameter defaulted to an empty array and was passed directly toscope.nodeswithout handling the "no selection = all nodes" case.Changes
useGetChartData.ts: Changednodes,tonodes: nodes.length ? nodes : ['*'],This is consistent with how
selectors.nodesalready uses['*'](line 69) and howdimensionsandlabelsusedefaultSelectorValuewhen empty.Testing
Fixes netdata/netdata-cloud#1132