-
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
fix: use both BSC and Whiteboard for disks #1564
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {createSelector} from '@reduxjs/toolkit'; | ||
|
||
import {stringifyVdiskId} from '../../../utils/dataFormatters/dataFormatters'; | ||
import {preparePDiskData, prepareVDiskData} from '../../../utils/disks/prepareDisks'; | ||
import {prepareWhiteboardVDiskData} from '../../../utils/disks/prepareDisks'; | ||
import type {RootState} from '../../defaultStore'; | ||
|
||
import {nodeApi} from './node'; | ||
|
@@ -29,14 +29,13 @@ export const selectNodeStructure = createSelector( | |
const groups = pool.Groups; | ||
groups?.forEach((group) => { | ||
const vDisks = group.VDisks?.filter((el) => el.NodeId === nodeId).map( | ||
prepareVDiskData, | ||
prepareWhiteboardVDiskData, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we use only whiteboard data here (without bsc) ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's data received from |
||
); | ||
vDisks?.forEach((vd) => { | ||
const vDiskId = stringifyVdiskId(vd.VDiskId); | ||
const preparedPDisk = preparePDiskData(vd.PDisk); | ||
const pDiskId = preparedPDisk.PDiskId; | ||
const pDiskId = vd.PDisk?.PDiskId; | ||
if (!structure[String(pDiskId)]) { | ||
structure[String(pDiskId)] = {vDisks: {}, ...preparedPDisk}; | ||
structure[String(pDiskId)] = {vDisks: {}, ...vd.PDisk}; | ||
} | ||
structure[String(pDiskId)].vDisks[vDiskId] = { | ||
...vd, | ||
|
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.
isNumeric ?