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

Fix sort of Side Drawer Advance Filters (CRASM-967) #740

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

hawkishpolicy
Copy link
Collaborator

@hawkishpolicy hawkishpolicy commented Dec 12, 2024

Applies a more user friendly and consistent display, plus increased functionality, to the checkbox controlled filters in the Advanced Filters section of the Side Drawer.

🗣 Description

  • Applied ascending sort to the following Advanced Filters:
    • Root Domain(s)
    • Ports
    • CVE
    • Severity
  • Added grouping and sorting logic similar to that of VulnerabilityBarChart to Severity Filters:
    • Null, undefined, empty string, and N/A values are placed into the "N/A" category.
    • Special characters, numbers, and Other are placed into the "Other" category.
    • All categories are now case insensitive.
  • Fixed issue with npm run syncdb:
    • searchSync was nested inside of syncdb -- -d populate.
    • This was preventing local db changes from syncing.
    • Issue is resolved.

💭 Motivation and context

🧪 Testing

  • Tested locally.

📷 Screenshots (if appropriate)

Screenshot 2024-12-12 at 10 22 11 AM Screenshot 2024-12-12 at 10 22 32 AM Screenshot 2024-12-12 at 10 22 44 AM Screenshot 2024-12-12 at 10 22 55 AM

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

✅ Pre-merge checklist

  • Revert dependencies to default branches.
  • Finalize version.

✅ Post-merge checklist

  • Create a release.

- Added sort to portFacet.
- Added sort to cveFacet.
- Severity levels are now sorted in order of Low, Medium, High, Critical.
- npm run syncdb was not syncing domains on run due to it being nested inside syncdb -- -d populate.
-- Thus changes to local db were not being reflected in the search index.
- Edited severityFacet logic to only show severity filters if there are severity filters to show.
- Added a sort to display severity filters in the following order: N/A, Low, Medium, High, Critical, Other.
- Added data validation logic to group irregular severity values into appropriate categories.
- Null, empty string, N/A, and undefined values are grouped into the "N/A" category.
- Special characters, numbers, and Other are grouped into the "Other" category.
- All categories are case insensitive.
- Edited vulnerability.severity agg in buildRequest.ts to inclues "null" values.
- Increased aggregation size to 50 to include all severity values.
- Removed console.logs.
- Removed commented out code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant