Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
artemmufazalov committed Nov 5, 2024
1 parent 4f08ff4 commit fc25da3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/PDiskPopup/PDiskPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {EMPTY_DATA_PLACEHOLDER} from '../../utils/constants';
import {createPDiskDeveloperUILink} from '../../utils/developerUI/developerUI';
import type {PreparedPDisk} from '../../utils/disks/types';
import {useTypedSelector} from '../../utils/hooks';
import {bytesToGB} from '../../utils/utils';
import {bytesToGB, isNumeric} from '../../utils/utils';
import {InfoViewer} from '../InfoViewer';
import type {InfoViewerItem} from '../InfoViewer';
import {LinkWithIcon} from '../LinkWithIcon/LinkWithIcon';
Expand Down Expand Up @@ -54,7 +54,7 @@ export const preparePDiskData = (
pdiskData.push({label: 'Path', value: Path});
}

if (!isNaN(Number(TotalSize))) {
if (isNumeric(TotalSize)) {
pdiskData.push({
label: 'Available',
value: `${bytesToGB(AvailableSize)} of ${bytesToGB(TotalSize)}`,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/disks/prepareDisks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function prepareWhiteboardVDiskData(
? prepareWhiteboardPDiskData({...PDisk, NodeId: PDisk?.NodeId ?? NodeId})
: undefined;

const actualPDiskId = PDiskId ?? PDisk?.PDiskId;
const actualPDiskId = PDiskId ?? preparedPDisk?.PDiskId;

const vDiskSizeFields = prepareVDiskSizeFields({
AvailableSize: AvailableSize ?? PDisk?.AvailableSize,
Expand Down

0 comments on commit fc25da3

Please sign in to comment.