File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 11import { useTopicDataAvailable } from '../../../../store/reducers/capabilities/hooks' ;
2- import { EPathType } from '../../../../types/api/schema' ;
2+ import { EPathSubType , EPathType } from '../../../../types/api/schema' ;
33import { isTableType } from '../../utils/schema' ;
44import i18n from '../i18n' ;
55
@@ -15,14 +15,14 @@ export function PreviewContainer(props: PreviewContainerProps) {
1515 const { type, subType} = props ;
1616 const isTable = isTableType ( type ) ;
1717 const isTopic = type === EPathType . EPathTypePersQueueGroup ;
18+ const isCdcTopic = subType === EPathSubType . EPathSubTypeStreamImpl ;
1819 const isTopicPreviewAvailable = useTopicDataAvailable ( ) ;
1920
2021 if ( isTable ) {
2122 return < TablePreview { ...props } /> ;
2223 }
2324
24- // preview is not available for topics inside CDC (has subtype)
25- if ( isTopic && ! subType && isTopicPreviewAvailable ) {
25+ if ( isTopic && ! isCdcTopic && isTopicPreviewAvailable ) {
2626 return < TopicPreview { ...props } /> ;
2727 }
2828
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import {api} from '../../../store/reducers/api';
66import { setShowPreview } from '../../../store/reducers/schema/schema' ;
77import { TENANT_PAGES_IDS , TENANT_QUERY_TABS_ID } from '../../../store/reducers/tenant/constants' ;
88import { setQueryTab , setTenantPage } from '../../../store/reducers/tenant/tenant' ;
9+ import { EPathSubType } from '../../../types/api/schema' ;
910import i18n from '../i18n' ;
1011
1112import type { YdbNavigationTreeProps } from './types' ;
@@ -62,6 +63,8 @@ export const getSchemaControls =
6263 const options = bindActions ( path , dispatch , additionalEffects ) ;
6364 const openPreview = getPreviewControl ( options , size ) ;
6465
66+ const isCdcTopic = meta ?. subType === EPathSubType . EPathSubTypeStreamImpl ;
67+
6568 const nodeTypeToControls : Record < NavigationTreeNodeType , Controls > = {
6669 async_replication : undefined ,
6770 transfer : undefined ,
@@ -74,7 +77,7 @@ export const getSchemaControls =
7477 column_table : openPreview ,
7578
7679 index_table : undefined ,
77- topic : isTopicPreviewAvailable && ! meta ?. subType ? openPreview : undefined ,
80+ topic : isTopicPreviewAvailable && ! isCdcTopic ? openPreview : undefined ,
7881 stream : undefined ,
7982
8083 index : undefined ,
You can’t perform that action at this time.
0 commit comments