Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROX-27747: Include CIDR block modal when filtering #13944

Open
wants to merge 1 commit into
base: ROX-27744
Choose a base branch
from

Conversation

sachaudh
Copy link
Contributor

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 the ExternalFlows 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

  • CHANGELOG is updated OR update is not needed
  • documentation PR is created and is linked above OR is not needed

Testing and quality

  • the change is production ready: the change is GA or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

Screenshot 2025-01-23 at 9 39 48 AM
Screenshot 2025-01-23 at 9 40 16 AM

@sachaudh sachaudh requested a review from bradr5 January 23, 2025 17:41
@sachaudh sachaudh requested a review from a team as a code owner January 23, 2025 17:41
@rhacs-bot
Copy link
Contributor

Images are ready for the commit at 31a122a.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.7.x-507-g31a122a3fc.

Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.85%. Comparing base (99dd5c2) to head (31a122a).

Additional details and impacted files
@@              Coverage Diff              @@
##           ROX-27744   #13944      +/-   ##
=============================================
- Coverage      48.85%   48.85%   -0.01%     
=============================================
  Files           2496     2496              
  Lines         180747   180747              
=============================================
- Hits           88301    88295       -6     
- Misses         85433    85437       +4     
- Partials        7013     7015       +2     
Flag Coverage Δ
go-unit-tests 48.85% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants