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

343 UI Update Admin Tools Scan History table #364

Merged
merged 18 commits into from
Jun 26, 2024

Conversation

hawkishpolicy
Copy link
Collaborator

  • Updated ScanTasksView table to MUI Data Grid X

🗣 Description

  • Refactored code to use new Data Grid
  • Added aria-labels to Details Icon Button
  • Corrected tab indexing of table
  • Built new Scan Name dropdown filter
  • Built new Scan Status dropdown filter
  • Built new modal to house Logs, Inout, Output, and Actions.

💭 Motivation and context

🧪 Testing

📷 Screenshots (if appropriate)

Screenshot 2024-06-25 at 10 37 20 AM
Screenshot 2024-06-25 at 11 04 20 AM
Screenshot 2024-06-25 at 11 04 28 AM

✅ 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 new and existing tests pass.

✅ Pre-merge checklist

  • Revert dependencies to default branches.
  • Finalize version.

✅ Post-merge checklist

  • Create a release.

- Code belongs on a separate branch.
- Added MUI Data Grid to ScanTasksView.
- Added MUI modal to ScanTasksView.
- Scan Task details are now displayed in the modal.
- Removed erroneous table from ScansView.
    - Deleted the new table from ScansView.
    - That table is on a separate branch
- Server-side pagination is implemented.
- Server-side filtering is not yet implemented.
- Changed page size to match other tables in app.
- Changed page size to 15.
- Removed unused code for page size in .env.
- Edited api call to accept page size variable.
- Added page size to the query string in the frontend.
- Built filter by name drop down component in DataGrid toolbar.
- Built filter by status drop down component in DataGrid toolbar.
- Refined Scan Name dropdown menu.
- Refined Scan Status dropdown menu.
- Added return to fetchScans function to prevent an empty table from rendering.
- Formatted Created At and Updated At columns to display in a more readable format.
- Added Logs and killScan to Details modal.
- Reverted killScan function.
- Reenabled old table, expanded view, pagination, sorting, and filtering.
- added keys to list items in Scan Name dropdown.
- added keys to list items in Scan Status dropdown.
- added keys to children in Data Grid toolbar.
- Removed json parsing of output. Scan output does not require parsing.
- Made modal large to showcase scan logs better.
- Scan logs now display properly.
- Added close button to modal.
- Added aria-labels to buttons.
- New Data Grid allows for the passing in of Scan Task id versus row index.
- Built modified killScan function to accept Scan Task id.
- Both are enabled for testing.
- Removed old table, old pagination, and old expanded row.
- Removed old imports.
- Removed old helper functions.
Copy link
Contributor

@aloftus23 aloftus23 left a comment

Choose a reason for hiding this comment

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

  • Filtering of Name and Status only works if the value exists. Say, dnstwist hasn't been run ever and you filter the Name by dnstwist; the table doesn't change at all. Instead should say No results or something
  • The table needs to be sorted by the Created At column where the first entry is the most recent. I believe right now it is doing the opposite

Otherwise looks good!

Copy link
Contributor

@aloftus23 aloftus23 left a comment

Choose a reason for hiding this comment

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

Looks good!

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.

Looks good...

@schmelz21 schmelz21 merged commit cae8335 into develop Jun 26, 2024
19 of 22 checks passed
@schmelz21 schmelz21 deleted the 343-ui-update-admin-tools-scan-history-table branch June 26, 2024 15:08
filters: tableFilters
}
}
);
// if (result.length === 0) return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this commented code needed?

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.

UI: Update Admin Tools Scan History Table
4 participants