-
Notifications
You must be signed in to change notification settings - Fork 0
Standardize datatable #17
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request standardizes data table implementations across the frontend by consolidating custom resource-specific DataTable components into a unified UniversalDataTable component. The change reduces code duplication, eliminates style drift between tables, and removes drag-and-drop functionality.
- Removes numerous custom DataTable components and replaces them with UniversalDataTable
- Eliminates drag-and-drop functionality from all data tables
- Standardizes table styling and behavior across the application
Reviewed Changes
Copilot reviewed 40 out of 65 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
frontend/src/components/data_tables/DeploymentsDataTable.tsx | Complete removal of custom deployments data table (759 lines deleted) |
frontend/src/components/data_tables/DaemonSetsDataTable.tsx | Complete removal of custom daemon sets data table (782 lines deleted) |
frontend/src/components/data_tables/CronJobsDataTable.tsx | Complete removal of custom cron jobs data table (740 lines deleted) |
frontend/src/components/data_tables/ConfigMapsDataTable.tsx | Complete removal of custom config maps data table (685 lines deleted) |
frontend/src/components/data_tables/ClusterRolesDataTable.tsx | Complete removal of custom cluster roles data table (615 lines deleted) |
frontend/src/components/data_tables/ClusterRoleBindingsDataTable.tsx | Complete removal of custom cluster role bindings data table (627 lines deleted) |
frontend/src/components/data_tables/CSIDriversDataTable.tsx | Complete removal of custom CSI drivers data table (694 lines deleted) |
frontend/src/components/data_tables/CRDsDataTable.tsx | Complete removal of custom CRDs data table (705 lines deleted) |
frontend/src/components/data_tables/ApiResourcesDataTable.tsx | Complete removal of custom API resources data table (651 lines deleted) |
frontend/src/components/containers/VolumeSnapshotsPageContainer.tsx | Migration to UniversalDataTable with new column definitions and filter implementation |
frontend/src/components/containers/VolumeSnapshotClassesPageContainer.tsx | Migration to UniversalDataTable with new column definitions and filter implementation |
frontend/src/components/containers/VirtualServicesPageContainer.tsx | Migration to UniversalDataTable with extensive new column definitions and action handlers |
frontend/src/components/containers/StorageClassesContainer.tsx | Migration to UniversalDataTable with new column definitions and bulk action handlers |
frontend/src/components/containers/StatefulSetsPageContainer.tsx | Migration to UniversalDataTable with new column definitions and confirmation dialogs |
frontend/src/components/containers/ServicesPageContainer.tsx | Migration to UniversalDataTable with new column definitions and service type filtering |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
</RouteGuard> | ||
) | ||
return ( | ||
<RouteGuard requiredCapabilities={["pods.list"]}> |
Copilot
AI
Sep 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RouteGuard is checking for 'pods.list' capability but this is a VirtualServices page. It should check for virtual service capabilities like 'virtualservices.list' instead.
<RouteGuard requiredCapabilities={["pods.list"]}> | |
<RouteGuard requiredCapabilities={["virtualservices.list"]}> |
Copilot uses AI. Check for mistakes.
header: "Virtual Service Name", | ||
cell: ({ row }: { row: Row<z.infer<typeof virtualServiceSchema>> }) => { | ||
return ( | ||
<IfAllowed feature="pods.get" cluster={clusterId} namespace={row.original.namespace} resourceName={row.original.name} fallback={ |
Copilot
AI
Sep 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The authorization check is using 'pods.get' feature but should be checking for 'virtualservices.get' to properly authorize virtual service access.
<IfAllowed feature="pods.get" cluster={clusterId} namespace={row.original.namespace} resourceName={row.original.name} fallback={ | |
<IfAllowed feature="virtualservices.get" cluster={clusterId} namespace={row.original.namespace} resourceName={row.original.name} fallback={ |
Copilot uses AI. Check for mistakes.
View Details | ||
</DropdownMenuItem> | ||
</IfAllowed> | ||
<IfAllowed feature="pods.patch" cluster={clusterId} namespace={row.original.namespace} resourceName={row.original.name} fallback={ |
Copilot
AI
Sep 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The authorization check is using 'pods.patch' feature but should be checking for 'virtualservices.patch' to properly authorize virtual service editing.
Copilot uses AI. Check for mistakes.
</ResourceYamlEditor> | ||
</IfAllowed> | ||
<DropdownMenuSeparator /> | ||
<IfAllowed feature="pods.patch" cluster={clusterId} namespace={row.original.namespace} resourceName={row.original.name} fallback={ |
Copilot
AI
Sep 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The authorization check is using 'pods.patch' feature but should be checking for 'virtualservices.patch' for reload configuration functionality.
<IfAllowed feature="pods.patch" cluster={clusterId} namespace={row.original.namespace} resourceName={row.original.name} fallback={ | |
<IfAllowed feature="virtualservices.patch" cluster={clusterId} namespace={row.original.namespace} resourceName={row.original.name} fallback={ |
Copilot uses AI. Check for mistakes.
</DropdownMenuItem> | ||
</IfAllowed> | ||
<DropdownMenuSeparator /> | ||
<IfAllowed feature="pods.delete" cluster={clusterId} namespace={row.original.namespace} resourceName={row.original.name} fallback={ |
Copilot
AI
Sep 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The authorization check is using 'pods.delete' feature but should be checking for 'virtualservices.delete' to properly authorize virtual service deletion.
<IfAllowed feature="pods.delete" cluster={clusterId} namespace={row.original.namespace} resourceName={row.original.name} fallback={ | |
<IfAllowed feature="virtualservices.delete" cluster={clusterId} namespace={row.original.namespace} resourceName={row.original.name} fallback={ |
Copilot uses AI. Check for mistakes.
'pods.get', | ||
'pods.patch', | ||
'pods.delete', |
Copilot
AI
Sep 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The capabilities being fetched are for pods but this is a virtual services component. Should fetch 'virtualservices.get', 'virtualservices.patch', 'virtualservices.delete' instead.
'pods.get', | |
'pods.patch', | |
'pods.delete', | |
'virtualservices.get', | |
'virtualservices.patch', | |
'virtualservices.delete', |
Copilot uses AI. Check for mistakes.
Each resource page table had its own custom DataTable.tsx. This was overkill and led to style drift.
Standardized into using UniversalDataTable.tsx and removed drag and drop functionality.