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

261 UI: Update All Domains & All Vulnerabilities Tables #291

Merged
merged 17 commits into from
Jun 18, 2024

Conversation

hawkishpolicy
Copy link
Collaborator

Replace old React Table based tables with the new MUI Data Grid X tables

🗣 Description

  • Copied functionality of old Domains and Vulnerabilities tables into the more modern MUI Data Grid X components.
  • Removed unused code.
  • Kept server side pagination and filtering.
  • Sorting is handled by new component out of the box.

💭 Motivation and context

🧪 Testing

📷 Screenshots (if appropriate)

Uncomment this section if a screenshot is needed.

Screenshot 2024-05-24 at 1 14 54 PM
Screenshot 2024-05-24 at 1 15 00 PM
Screenshot 2024-05-24 at 1 14 36 PM
Screenshot 2024-05-24 at 1 14 27 PM

✅ 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 relevant repo and/or project documentation has been updated
    to reflect 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.

- Built new table with MUI DataGrid
- Built new fetchAllDomains callBack function in useDomainApi.ts
- Pagination, filtering, and sorting are client side now.
- Removed the query paramters as they are not needed.
- made PAGE_SIZE consistent accross all tables. It defaults to 15 rows now.
- replaced react table with material-ui table
- added custom sort for severity levels
- server side pagination and filtering for Domains and Vulnerabilities tables
- removed old code for react-table in Domains
- Added a status change dropdown to the vulnerabilities table
- Added a return if domains or vulnerabilities are empty upon filtering. Prevents the table from rendering empty if there are no domains or vulnerabilities matching the filter
- Removed old React Table code
- Removed any unused code
- Added hyperlink for the domain name
- Added endIcons to Vulnerability, Domain, and Status columns
- Added domianId to row data object
@hawkishpolicy hawkishpolicy self-assigned this May 24, 2024
@hawkishpolicy hawkishpolicy linked an issue May 24, 2024 that may be closed by this pull request
1 task
- Removed unused import for set in from Domains.tsx
- Removed unused import for sub from Vulnerabilities.tsx
- Removed unused initialSortBy function in Vulnerabilities.tsx
- Removed unused initialFilterBy function in Vulnerabilities.tsx
@hawkishpolicy hawkishpolicy marked this pull request as ready for review May 24, 2024 19:01
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.

This looks great. Maybe changing 'testDomain' to something more recognizable would be best. Otherwise LGTM.

- Created a new interface for the TestVulnerability object.
- Removed console.logs from Domains.tsx and Vulnerabilities.tsx
Copy link
Collaborator

@schmelz21 schmelz21 left a comment

Choose a reason for hiding this comment

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

This is looking great. So far the only thing I see is on the assets details page has a button that shouldn't be there. Looks like carried over from the templated frame.

Screenshot 2024-06-06 at 2 49 59 PM

@hawkishpolicy
Copy link
Collaborator Author

I was under the impression that button took you to the domain in question.

@schmelz21
Copy link
Collaborator

I was under the impression that button took you to the domain in question.

@hawkishpolicy - after our review, yes let's keep it in this code push as it is exsiting functionality. We can make an Issue to review at a later time. Thanks. Approving this PR.

@schmelz21 schmelz21 self-requested a review June 6, 2024 20:05
Copy link
Collaborator

@schmelz21 schmelz21 left a comment

Choose a reason for hiding this comment

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

After UAT and Review - LGTM

- Added aria-labels to icons with no text in Domains and Vulnerabilities tables
- Removed tab indexes from icons in Domains and Vulnerabilities tables so as not to interfere with tabbing through the table
-
Copy link
Collaborator

@rapidray12 rapidray12 left a comment

Choose a reason for hiding this comment

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

Change testdomain to domain

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

@schmelz21 schmelz21 merged commit dc6ad4c into develop Jun 18, 2024
19 of 22 checks passed
@schmelz21 schmelz21 deleted the 261-ui-update-all-domainsall-vulnerabilities-tables branch June 18, 2024 17:34
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.

UI: Update All Domains/All Vulnerabilities Tables
5 participants