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

Added Open/All status toggle to All Vulns table #796

Merged
merged 6 commits into from
Feb 20, 2025

Conversation

hawkishpolicy
Copy link
Collaborator

@hawkishpolicy hawkishpolicy commented Feb 14, 2025

  • Display the same type of vulnerabilities in the All Vulns tables as the stats based info graphics in Overview by default but also allow the User to see every vulnerability related to their org when needed.

🗣 Description

  • Added showAll boolean to VulnerabilitySearch base model.
  • Added showAll boolean to the Query type in query.ts.
  • Edited vulnerability.py to add status=open filter to search_vulnerabilities unless showAll is true.
  • Edited fetchVulnerabilities to handle the new boolean.
  • Added a ternary based button to the All Vulns table to switch between Open and All statuses.
  • Only open vulnerabilities are now shown by default.
  • User can then toggle to see all vulnerabilities regardless of status.

💭 Motivation and context

  • Closes CRASM-2222

🧪 Testing

  • tested locally

📷 Screenshots (if appropriate)

Screenshot 2025-02-14 at 5 13 24 PM Screenshot 2025-02-14 at 5 13 33 PM Screenshot 2025-02-14 at 5 13 53 PM Screenshot 2025-02-14 at 5 13 44 PM

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All future TODOs are captured in issues, which are referenced
    in code comments.
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

✅ Pre-merge checklist

  • Revert dependencies to default branches.
  • Finalize version.

✅ Post-merge checklist

  • Create a release.

- Added showAll boolean to VulnerabilitySearch base model.
- Added showAll boolean to the Query type in query.ts.
- Edited vulnerability.py to add status=open filter to search_vulnerabilities unless showAll is true.
- Edited fetchVulnerabilities to handle the new boolean.
- Added a ternary based button to the All Vulns table to switch between Open and All statuses.
- Only open vulnerabilities are now shown by default.
- User can then toggle to see all vulnerabilities regardless of status.
Copy link
Collaborator

@chrtorres chrtorres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@cduhn17 cduhn17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rapidray12 rapidray12 merged commit 59b0539 into develop Feb 20, 2025
18 of 19 checks passed
@rapidray12 rapidray12 deleted the Edit-All-Vulns-Call-CRASM-2222 branch February 20, 2025 18:01
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.

4 participants