1
- import { DefinitionList } from '@gravity-ui/uikit' ;
2
-
3
1
import { getTabletPagePath } from '../../routes' ;
4
- import { createTabletDeveloperUIHref } from '../../utils/developerUI/developerUI' ;
5
- import { useIsUserAllowedToMakeChanges } from '../../utils/hooks/useIsUserAllowedToMakeChanges' ;
6
- import { CellWithPopover } from '../CellWithPopover/CellWithPopover' ;
7
2
import { EntityStatus } from '../EntityStatus/EntityStatus' ;
8
- import { LinkWithIcon } from '../LinkWithIcon/LinkWithIcon' ;
9
-
10
- import i18n from './i18n' ;
11
3
12
4
interface TabletNameWrapperProps {
13
5
tabletId : string | number ;
@@ -16,34 +8,10 @@ interface TabletNameWrapperProps {
16
8
}
17
9
18
10
export function TabletNameWrapper ( { tabletId, followerId, database} : TabletNameWrapperProps ) {
19
- const isUserAllowedToMakeChanges = useIsUserAllowedToMakeChanges ( ) ;
20
-
21
11
const tabletPath = getTabletPagePath ( tabletId , { database, followerId : followerId ?. toString ( ) } ) ;
22
12
const tabletName = `${ tabletId } ${ followerId ? `.${ followerId } ` : '' } ` ;
23
13
24
14
return (
25
- < CellWithPopover
26
- disabled = { ! isUserAllowedToMakeChanges }
27
- closeDelay = { 200 }
28
- content = {
29
- < DefinitionList responsive >
30
- < DefinitionList . Item name = { i18n ( 'field_links' ) } >
31
- < LinkWithIcon
32
- title = { i18n ( 'context_developer-ui' ) }
33
- url = { createTabletDeveloperUIHref ( tabletId ) }
34
- />
35
- </ DefinitionList . Item >
36
- </ DefinitionList >
37
- }
38
- placement = { [ 'top' , 'bottom' ] }
39
- openDelay = { 0 }
40
- >
41
- < EntityStatus
42
- name = { tabletName }
43
- path = { tabletPath }
44
- hasClipboardButton
45
- showStatus = { false }
46
- />
47
- </ CellWithPopover >
15
+ < EntityStatus name = { tabletName } path = { tabletPath } hasClipboardButton showStatus = { false } />
48
16
) ;
49
17
}
0 commit comments