-
Notifications
You must be signed in to change notification settings - Fork 13
Refactor Domain and IP Filters in Findings Library (CRASM-2704) #1209
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
Draft
hawkishpolicy
wants to merge
26
commits into
develop
Choose a base branch
from
Refactor-Domain/IP-Filters-CRASM-2704
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…b.com/cisagov/XFD into Refactor-Domain/IP-Filters-CRASM-2704
- Brought in filters, addFilter, and removeFilter from props. - Updated useEffect to include regionFilterValues and orgFilterValues as dependencies. - Updated searchDomainsAndIPs call to include regionFilterValues and orgFilterValues. - Updated handleDomainChange to remove existing 'domain' filters before adding a new one.
- Needs testing but refactored endpoint appears to be working.
…-Filters-CRASM-2704
…b.com/cisagov/XFD into Refactor-Domain/IP-Filters-CRASM-2704
- Allows user to select/deselect domains to filter by. - Extends current facet filter functionaility of filtering by multiple domains.
…b.com/cisagov/XFD into Refactor-Domain/IP-Filters-CRASM-2704
- a search_field prop to toggle between domain and IP search - conditional rendering of Autocomplete options based on search_field - conditional adding of filters based on search_field - conditional rendering of checkbox controlled lists based on search_field - need to separate state for domain and IP search terms, results, and selected values - this should eliminate duplicate calls related to the useEffect.
- Improved code readability and maintainability. - Removed unused state variables and handlers. - Ensured consistent state management for domain and IP filters. - Prevent potential bugs related to state handling and duplicate api calls. - began trouble shooting an issue where autocomplete was not closing properly. - this issue affects autocompletes throughout the app.
- Restored original Open logic for RegionAndOrganizationFilters and VSDashRegionAndOrgFilters components. - This change is out of scope for the current task but is necessary to maintain existing functionality. - Need to determine if the open logic should be custom or handled internally by MUI Autocomplete component. - I'm leaning towards the latter, as I'm not sure why we need custom state and logic for this. - Cleaned up code.
- Cleaned up ResultsShallow type by making fields optional. - Applied ResultsShallow type to domain search API calls. - This kept the codebase consistent and reduced potential errors. - Made applying domain name and IP data to rendered components cleaner and more reliable. - Ensured Domain Results are based off of domain names via filter and mapping. - Ensured IP Results are based off of IP addresses via filter and mapping. - Added utility function to identify IP addresses in Domain results. - Filtered out results that are already selected in filters. - Implemented custom sorting logic for domain names and IP addresses. - Domain names are sorted alphabetically. - IP addresses are sorted numerically to ensure correct order (e.g., 192.168.1.1). - Improved sorting logic for IP addresses to ensure numerical order. - Increased Elasticsearch query size to 15 to ensure sufficient results. - Removed unnecessary return statements in async functions. - Removed console.log statements used for debugging.
…-Filters-CRASM-2704
- frontend/src/components/FilterDrawer/DrawerInterior.tsx - removes the old commented-out TaggedArrayInput components for domain and IP filters. - removes unused imports.
…-Filters-CRASM-2704
…-Filters-CRASM-2704
- Domain and IP search now shows up to 15 results instead of 10.
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.
Per Design Team request, this PR replaces the current Domain and IP filters used in the Findings Library with an Autocomplete based component that provides a list of Domain names and IP addresses based on user input.
🗣 Description
💭 Motivation and context
🧪 Testing
✅ Pre-approval checklist
bump_version
script if this repository is versioned and the changes in this PR warrant a version bump.✅ Pre-merge checklist
✅ Post-merge checklist