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: vdisks in 2 rows #1758

Merged
merged 9 commits into from
Dec 18, 2024
Merged

feat: vdisks in 2 rows #1758

merged 9 commits into from
Dec 18, 2024

Conversation

astandrik
Copy link
Collaborator

@astandrik astandrik commented Dec 16, 2024

Closes #730

Stand

use parameters ( /cluster/storage?type=nodes&mocks=1&pdisks=10&vdisksPerPDisk=100 )

to play with markup

This PR is really only about changing two css files

CI Results

Test Status: ✅ PASSED

📊 Full Report

Total Passed Failed Flaky Skipped
222 222 0 0 0

😟 No changes in tests. 😕

Bundle Size: ✅

Current: 65.88 MB | Main: 65.88 MB
Diff: +2.68 KB (0.00%)

✅ Bundle size unchanged.

ℹ️ 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.

@@ -0,0 +1,158 @@
import {EFlag} from '../../types/api/enums';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

for test only (will delete before merge)

flex-shrink: 0;
flex: 0 0 3px;

min-width: 3px;
Copy link
Member

Choose a reason for hiding this comment

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

Your solution works well only in the case, where all pdisks have the same amount of vdisks, it's not always true.

Previously we assumed, that all pdisks should be of the same size, so MaximumSlotsPerDisk was introduced so it will be possible to calculate pdisk size for paginated table (something like pDiskSize = MaximumSlotsPerDisk * VDISK_SIZE) and use it for all pdisks in this table (even if the don't have any vdisks)

Screenshot 2024-12-17 at 13 46 51

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Also added random vdisks count generation to pdisks in mocks

Comment on lines +261 to +262
const maximumSlots = calculateMaximumSlotsPerDisk(Nodes, MaximumSlotsPerDisk);
const preparedNodes = Nodes?.map((node) => prepareStorageNodeData(node, maximumSlots));
Copy link
Member

Choose a reason for hiding this comment

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

It looks like different table chunks could have different pdisk size with such calculations, since prepareStorageNodesResponse is called for every chunk

Copy link
Member

Choose a reason for hiding this comment

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

It handles corner case of the scenario, which it a corner case by itself. Decided in pm to leave it as it is in PR

@astandrik astandrik added this pull request to the merge queue Dec 18, 2024
Merged via the queue into main with commit 1f8d6fc Dec 18, 2024
7 checks passed
@astandrik astandrik deleted the astandrik.vdisks-in-2-rows-730 branch December 18, 2024 15:43
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.

VDisks in 2 rows
2 participants