-
Notifications
You must be signed in to change notification settings - Fork 15
fix: incorrect group numbers #2319
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 PR addresses an issue with incorrect group numbers by updating the control components used in storage and nodes group views. Key changes include:
- Replacing controls components with simplified versions across StorageNodes, StorageGroups, and Nodes components.
- Adding new props (entitiesCountCurrent, entitiesCountTotal, entitiesLoading) to pass count and loading state to the controls.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.tsx | Updated control component and added count props (both counts set to "found") for storage nodes |
src/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.tsx | Updated control component and added count props (using "found" and "total") for storage groups |
src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx | Updated control component and added count props (using "found" and "total") for nodes |
src/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.tsx
Outdated
Show resolved
Hide resolved
…esComponent.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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 PR replaces the previous *WithTableState
controls in grouped tables with the simpler controls components and ensures global totals are shown instead of per-page table counts.
- Swapped out
Storage*ControlsWithTableState
andNodesControlsWithTableState
for their plain counterparts - Passed
entitiesCountCurrent
,entitiesCountTotal
, andentitiesLoading
into each controls component - Updated imports and component props in three grouped table components
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.tsx | Replaced StorageNodesControlsWithTableState with StorageNodesControls and added count/loading props |
src/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.tsx | Replaced StorageGroupsControlsWithTableState with StorageGroupsControls and added count/loading props |
src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx | Replaced NodesControlsWithTableState with NodesControls , added count/loading props, and unified boolean prop shorthand |
Comments suppressed due to low confidence (5)
src/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.tsx:167
- [nitpick] The name
entitiesCountCurrent
may be ambiguous; consider renaming it tocurrentEntitiesCount
orfoundCount
for consistency and clarity.
entitiesCountCurrent={found}
src/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.tsx:19
- Ensure the
StorageNodesControls
props interface (or TypeScript definition) is updated to includeentitiesCountCurrent
,entitiesCountTotal
, andentitiesLoading
, otherwise this import change will cause type errors.
import {StorageNodesControls} from './StorageNodesControls';
src/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.tsx:19
- Verify that
StorageGroupsControls
has its props signature updated to acceptentitiesCountCurrent
,entitiesCountTotal
, andentitiesLoading
to prevent prop-type or TypeScript errors.
import {StorageGroupsControls} from './StorageGroupsControls';
src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx:16
- Make sure the
NodesControls
definition (PropTypes or TS interface) is updated to includeentitiesCountCurrent
,entitiesCountTotal
, andentitiesLoading
, matching the new usage in this component.
import {NodesControls} from '../NodesControls/NodesControls';
src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx:182
- [nitpick] The same three props (
entitiesCountCurrent
,entitiesCountTotal
,entitiesLoading
) are being passed through three different components. Consider extracting a shared HOC or helper to reduce repetition and improve maintainability.
withGroupBySelect
Stand
NodesControlsWithTableState uses tableState of table
In grouped tables we need global total and found instead of table data
Closes #2317
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
😟 No changes in tests. 😕
Bundle Size: ✅
Current: 83.62 MB | Main: 83.62 MB
Diff: +0.67 KB (0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information