|
1 | 1 | import cn from 'bem-cn-lite'; |
2 | 2 | import DataTable, {Column} from '@gravity-ui/react-data-table'; |
3 | | -import {Button, Popover} from '@gravity-ui/uikit'; |
| 3 | +import {Button, Popover, PopoverBehavior} from '@gravity-ui/uikit'; |
4 | 4 |
|
5 | 5 | import {Icon} from '../../components/Icon'; |
6 | 6 | import EntityStatus from '../../components/EntityStatus/EntityStatus'; |
7 | 7 | import PoolsGraph from '../../components/PoolsGraph/PoolsGraph'; |
8 | 8 | import ProgressViewer from '../../components/ProgressViewer/ProgressViewer'; |
9 | 9 | import {TabletsStatistic} from '../../components/TabletsStatistic'; |
| 10 | +import {NodeEndpointsTooltip} from '../../components/Tooltips/NodeEndpointsTooltip'; |
10 | 11 |
|
11 | 12 | import {formatBytesToGigabyte} from '../../utils/index'; |
12 | 13 | import {INodesPreparedEntity} from '../../types/store/nodes'; |
@@ -47,27 +48,29 @@ export function getNodesColumns({ |
47 | 48 | } |
48 | 49 | return ( |
49 | 50 | <div className={b('host-name-wrapper')}> |
50 | | - <EntityStatus |
51 | | - name={row.Host} |
52 | | - onNameMouseEnter={(e: MouseEvent) => |
53 | | - showTooltip(e.target, row, 'nodeEndpoints') |
54 | | - } |
55 | | - onNameMouseLeave={hideTooltip} |
56 | | - status={row.SystemState} |
57 | | - path={getDefaultNodePath(row.NodeId)} |
58 | | - hasClipboardButton |
59 | | - className={b('host-name')} |
60 | | - /> |
61 | | - {nodeRef && ( |
62 | | - <Button |
63 | | - size="s" |
64 | | - href={nodeRef} |
65 | | - className={b('external-button')} |
66 | | - target="_blank" |
67 | | - > |
68 | | - <Icon name="external" /> |
69 | | - </Button> |
70 | | - )} |
| 51 | + <Popover |
| 52 | + content={<NodeEndpointsTooltip data={row} />} |
| 53 | + placement={['top', 'bottom']} |
| 54 | + behavior={PopoverBehavior.Immediate} |
| 55 | + > |
| 56 | + <EntityStatus |
| 57 | + name={row.Host} |
| 58 | + status={row.SystemState} |
| 59 | + path={getDefaultNodePath(row.NodeId)} |
| 60 | + hasClipboardButton |
| 61 | + className={b('host-name')} |
| 62 | + /> |
| 63 | + {nodeRef && ( |
| 64 | + <Button |
| 65 | + size="s" |
| 66 | + href={nodeRef} |
| 67 | + className={b('external-button')} |
| 68 | + target="_blank" |
| 69 | + > |
| 70 | + <Icon name="external" /> |
| 71 | + </Button> |
| 72 | + )} |
| 73 | + </Popover> |
71 | 74 | </div> |
72 | 75 | ); |
73 | 76 | }, |
|
0 commit comments