ROX-27747: Include CIDR block modal when filtering #13944
+190
−50
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.
Description
This PR makes a few changes to add a CIDR block using the modal within the External flows section. We are using React context for this because of the following reason:
The modal component is rendered within
NetworkGraphPage
, 6 levels up from theExternalFlows
component. We don't want to prop drill that many levels. I'd consider prop drilling for simplicity if it were 2 (maybe even 3). Since it's 6 levels deep, I think it warrants the use of React Context.We also needed to pass the External IP value to the modal to display as the initial value when the modal opens. The React Context for the CIDR form modal will keep the state to allow for that behavior.
User-facing documentation
Testing and quality
Automated testing
How I validated my change