@@ -10,9 +10,12 @@ import {InternalLink} from '../../../../components/InternalLink';
1010import { UsageLabel } from '../../../../components/UsageLabel/UsageLabel' ;
1111import { VDiskWithDonorsStack } from '../../../../components/VDisk/VDiskWithDonorsStack' ;
1212import { getStorageGroupPath } from '../../../../routes' ;
13+ import { valueIsDefined } from '../../../../utils' ;
1314import { cn } from '../../../../utils/cn' ;
14- import { stringifyVdiskId } from '../../../../utils/dataFormatters/dataFormatters' ;
15+ import { EMPTY_DATA_PLACEHOLDER } from '../../../../utils/constants' ;
16+ import { formatNumber , stringifyVdiskId } from '../../../../utils/dataFormatters/dataFormatters' ;
1517import { isSortableStorageProperty } from '../../../../utils/storage' ;
18+ import { formatToMs , parseUsToMs } from '../../../../utils/timeParsers' ;
1619import { bytesToGB , bytesToSpeed } from '../../../../utils/utils' ;
1720import { Disks } from '../../Disks/Disks' ;
1821import { getDegradedSeverity , getUsageSeverityForStorageGroup , isVdiskActive } from '../../utils' ;
@@ -183,6 +186,30 @@ const writeColumn: StorageGroupsColumn = {
183186 align : DataTable . RIGHT ,
184187} ;
185188
189+ const latencyColumn : StorageGroupsColumn = {
190+ name : STORAGE_GROUPS_COLUMNS_IDS . Latency ,
191+ header : STORAGE_GROUPS_COLUMNS_TITLES . Latency ,
192+ width : 100 ,
193+ render : ( { row} ) => {
194+ return valueIsDefined ( row . LatencyPutTabletLogMs )
195+ ? formatToMs ( parseUsToMs ( row . LatencyPutTabletLogMs ) )
196+ : EMPTY_DATA_PLACEHOLDER ;
197+ } ,
198+ align : DataTable . RIGHT ,
199+ } ;
200+
201+ const allocationUnitsColumn : StorageGroupsColumn = {
202+ name : STORAGE_GROUPS_COLUMNS_IDS . AllocationUnits ,
203+ header : STORAGE_GROUPS_COLUMNS_TITLES . AllocationUnits ,
204+ width : 150 ,
205+ render : ( { row} ) => {
206+ return valueIsDefined ( row . AllocationUnits )
207+ ? formatNumber ( row . AllocationUnits )
208+ : EMPTY_DATA_PLACEHOLDER ;
209+ } ,
210+ align : DataTable . RIGHT ,
211+ } ;
212+
186213const getVDisksColumn = ( data ?: GetStorageColumnsData ) : StorageGroupsColumn => ( {
187214 name : STORAGE_GROUPS_COLUMNS_IDS . VDisks ,
188215 header : STORAGE_GROUPS_COLUMNS_TITLES . VDisks ,
@@ -236,7 +263,7 @@ export const getStorageTopGroupsColumns: StorageColumnsGetter = () => {
236263 } ) ;
237264} ;
238265
239- export const getStorageGroupsColumns : StorageColumnsGetter = ( data ?: GetStorageColumnsData ) => {
266+ export const getStorageGroupsColumns : StorageColumnsGetter = ( data ) => {
240267 const columns = [
241268 groupIdColumn ,
242269 poolNameColumn ,
@@ -249,6 +276,8 @@ export const getStorageGroupsColumns: StorageColumnsGetter = (data?: GetStorageC
249276 usedSpaceFlagColumn ,
250277 readColumn ,
251278 writeColumn ,
279+ latencyColumn ,
280+ allocationUnitsColumn ,
252281 getVDisksColumn ( data ) ,
253282 getDisksColumn ( data ) ,
254283 ] ;
0 commit comments