11import DataTable , { Column } from '@gravity-ui/react-data-table' ;
22import { Popover } from '@gravity-ui/uikit' ;
33
4- import PoolsGraph from '../../components/PoolsGraph/PoolsGraph' ;
4+ import { PoolsGraph } from '../../components/PoolsGraph/PoolsGraph' ;
55import ProgressViewer from '../../components/ProgressViewer/ProgressViewer' ;
66import { TabletsStatistic } from '../../components/TabletsStatistic' ;
77import { NodeHostWrapper } from '../../components/NodeHostWrapper/NodeHostWrapper' ;
@@ -10,21 +10,13 @@ import type {NodeAddress} from '../../utils/nodes';
1010import { formatBytesToGigabyte } from '../../utils/index' ;
1111
1212import type { INodesPreparedEntity } from '../../types/store/nodes' ;
13- import { showTooltip as externalShowTooltip } from '../../store/reducers/tooltip' ;
1413
1514interface GetNodesColumnsProps {
16- showTooltip : ( ...args : Parameters < typeof externalShowTooltip > ) => void ;
17- hideTooltip : VoidFunction ;
1815 tabletsPath ?: string ;
1916 getNodeRef ?: ( node ?: NodeAddress ) => string ;
2017}
2118
22- export function getNodesColumns ( {
23- showTooltip,
24- hideTooltip,
25- tabletsPath,
26- getNodeRef,
27- } : GetNodesColumnsProps ) {
19+ export function getNodesColumns ( { tabletsPath, getNodeRef} : GetNodesColumnsProps ) {
2820 const columns : Column < INodesPreparedEntity > [ ] = [
2921 {
3022 name : 'NodeId' ,
@@ -96,16 +88,7 @@ export function getNodesColumns({
9688 }
9789 } , 0 ) ,
9890 defaultOrder : DataTable . DESCENDING ,
99- render : ( { row} ) =>
100- row . PoolStats ? (
101- < PoolsGraph
102- onMouseEnter = { showTooltip }
103- onMouseLeave = { hideTooltip }
104- pools = { row . PoolStats }
105- />
106- ) : (
107- '—'
108- ) ,
91+ render : ( { row} ) => ( row . PoolStats ? < PoolsGraph pools = { row . PoolStats } /> : '—' ) ,
10992 align : DataTable . LEFT ,
11093 width : '120px' ,
11194 } ,
0 commit comments