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

feat(PaginatedStorage): add grouping #1364

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Sep 26, 2024

Closes: #1365

Stand: https://nda.ya.ru/t/_9dz2Iw678WGs4

To test grouping, enable Use paginated tables setting in experiments

CI Results

Test Status: βœ… PASSED

πŸ“Š Full Report

Total Passed Failed Flaky Skipped
124 124 0 0 0

Bundle Size: πŸ”Ί

Current: 79.12 MB | Main: 79.10 MB
Diff: +0.02 MB (0.02%)

⚠️ Bundle size increased. Please review.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • πŸ“Š indicates links to detailed reports.
  • πŸ”Ί indicates increase, πŸ”½ decrease, and βœ… no change in bundle size.

Comment on lines +106 to +108
const chunkOffset = id * limit;
const remainingLenght = totalLength - chunkOffset;
const calculatedChunkLength = remainingLenght < limit ? remainingLenght : limit;
Copy link
Member Author

Choose a reason for hiding this comment

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

This allows not to show 50 (limit) loading rows for the last chunk, when we know how many entities are left. Also it allows to set some predefined initial length to table

@@ -21,7 +21,7 @@
}

&__vdisks-item {
flex-basis: 5px;
flex-basis: 3px;
Copy link
Member Author

Choose a reason for hiding this comment

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

Allow PDisk to have more compact VDisks on it. It's needed to make StorageNodes to have the same row height, allowing switching from variable RDT rendering to uniform

@@ -9,6 +9,7 @@
align-items: flex-end;

width: max-content;
height: 40px;
Copy link
Member Author

Choose a reason for hiding this comment

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

Make PDisk row to have the same height. It's needed to make StorageNodes to have the same row height, allowing switching from variable RDT rendering to uniform

Comment on lines +176 to +194
<StorageGroupsControls
withTypeSelector
entitiesCountCurrent={storageGroups.length}
entitiesCountTotal={groupsTotalCount}
entitiesLoading={isLoading}
columnsToSelect={storageGroupsColumnsToSelect}
handleSelectedColumnsUpdate={setStorageGroupsSelectedColumns}
/>
) : null}
{isNodes ? (
<StorageNodesControls
withTypeSelector
entitiesCountCurrent={storageNodes.length}
entitiesCountTotal={nodesTotalCount}
entitiesLoading={isLoading}
columnsToSelect={storageNodesColumnsToSelect}
handleSelectedColumnsUpdate={setStorageNodesSelectedColumns}
/>
) : null}
Copy link
Member Author

Choose a reason for hiding this comment

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

Added different controls to the same component. As the next step Storage could be split into two components like PaginatedStorage

Comment on lines -12 to -14
const getConcurrentId = (limit?: number, offset?: number) => {
return `getStorageGroups|offset${offset}|limit${limit}`;
};
Copy link
Member Author

Choose a reason for hiding this comment

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

Requests are managed by PaginatedTable and rtk-query, there is no need to manage it additionally by axios, moreover - in case with grouping it creates a bug


const b = cn('usage-filter');

export const UsageFilter = (props: UsageFilterProps) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

UsageFilter has been disabled in our UI for months. The problem it solved now is solved by grouping, it can be deleted

@artemmufazalov artemmufazalov force-pushed the 1302-paginated-storage-grouping branch 2 times, most recently from a34479b to a16b0be Compare September 26, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add grouping to PaginatedStorage
1 participant