-
Notifications
You must be signed in to change notification settings - Fork 9
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: set pdisks column width #1793
Conversation
src/mocks/storage/nodes.ts
Outdated
@@ -0,0 +1,224 @@ | |||
import {EFlag} from '../../types/api/enums'; |
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.
Will delete mocks right before merge
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.
Copilot reviewed 5 out of 10 changed files in this pull request and generated no comments.
Files not reviewed (5)
- src/containers/Storage/PDisk/PDisk.scss: Language not supported
- src/containers/Storage/StorageNodes/columns/StorageNodesColumns.scss: Language not supported
- src/styles/mixins.scss: Language not supported
- src/store/reducers/storage/utils.ts: Evaluated as low risk
- src/types/api/nodes.ts: Evaluated as low risk
Comments suppressed due to low confidence (4)
src/containers/Storage/StorageNodes/getNodes.ts:50
- [nitpick] The variable name 'pdisks' is ambiguous. It should be renamed to 'maxPdisks' for clarity.
const pdisks = parseInt(urlParams.get('pdisks') || '10', 10);
src/containers/Storage/StorageNodes/getNodes.ts:51
- [nitpick] The variable name 'vdisksPerPDisk' is ambiguous. It should be renamed to 'maxVdisksPerPDisk' for clarity.
const vdisksPerPDisk = parseInt(urlParams.get('vdisksPerPDisk') || '2', 10);
src/containers/Storage/StorageNodes/columns/columns.tsx:43
- The value assigned to the CSS variable '--maximum-slots' should be validated to ensure it is a valid number.
[MAX_SLOTS_CSS_VAR]: row.MaximumSlotsPerDisk,
src/containers/Storage/StorageNodes/columns/columns.tsx:44
- The value assigned to the CSS variable '--maximum-disks' should be validated to ensure it is a valid number.
[MAX_DISKS_CSS_VAR]: row.MaximumDisksPerNode,
@@ -3,6 +3,7 @@ import { | |||
NODES_COLUMNS_TO_DATA_FIELDS, |
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.
Will delete mocks right before merge
src/store/reducers/storage/utils.ts
Outdated
return providedMaximumDisksPerNode; | ||
} | ||
|
||
return String(Math.max(1, ...(nodes || []).map((node) => node.PDisks?.length || 0))); |
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.
it's quite hard to read. Could you please refactor?
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.
mission accomplished
mind that its a fallback function for corner case of a corner case
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.
Copilot reviewed 5 out of 11 changed files in this pull request and generated no comments.
Files not reviewed (6)
- src/containers/Storage/PDisk/PDisk.scss: Language not supported
- src/containers/Storage/StorageNodes/columns/StorageNodesColumns.scss: Language not supported
- src/styles/mixins.scss: Language not supported
- src/containers/Storage/PDisk/PDisk.tsx: Evaluated as low risk
- src/containers/Storage/StorageNodes/columns/columns.tsx: Evaluated as low risk
- src/containers/Storage/StorageNodes/getNodes.ts: Evaluated as low risk
Closes #1789
Stand
in url there are parameters for testing:
pdisks=3&vdisksPerPDisk=20&mocks=1&totalNodes=64
pdisks - maximum number of pdisks per node
vdisksPerPDisk - maximum number of vdisks per pdisk
totalNodes - total nodes in nodes list
CI Results
Test Status: ✅ PASSED
📊 Full Report
😟 No changes in tests. 😕
Bundle Size: 🔺
Current: 66.18 MB | Main: 66.17 MB
Diff: +7.55 KB (0.01%)
ℹ️ CI Information