1- import { DefinitionList } from '@gravity-ui/uikit' ;
2-
31import { getTabletPagePath } from '../../routes' ;
4- import { createTabletDeveloperUIHref } from '../../utils/developerUI/developerUI' ;
5- import { useIsUserAllowedToMakeChanges } from '../../utils/hooks/useIsUserAllowedToMakeChanges' ;
6- import { CellWithPopover } from '../CellWithPopover/CellWithPopover' ;
72import { EntityStatus } from '../EntityStatus/EntityStatus' ;
8- import { LinkWithIcon } from '../LinkWithIcon/LinkWithIcon' ;
9-
10- import i18n from './i18n' ;
113
124interface TabletNameWrapperProps {
135 tabletId : string | number ;
@@ -16,34 +8,10 @@ interface TabletNameWrapperProps {
168}
179
1810export function TabletNameWrapper ( { tabletId, followerId, database} : TabletNameWrapperProps ) {
19- const isUserAllowedToMakeChanges = useIsUserAllowedToMakeChanges ( ) ;
20-
2111 const tabletPath = getTabletPagePath ( tabletId , { database, followerId : followerId ?. toString ( ) } ) ;
2212 const tabletName = `${ tabletId } ${ followerId ? `.${ followerId } ` : '' } ` ;
2313
2414 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 } />
4816 ) ;
4917}
0 commit comments