1- import { CirclePlus , Copy , DisplayPulse , PlugConnection } from '@gravity-ui/icons' ;
1+ import { CirclePlus , Code , Copy , DisplayPulse , PlugConnection } from '@gravity-ui/icons' ;
22import { Flex , Spin } from '@gravity-ui/uikit' ;
33import copy from 'copy-to-clipboard' ;
44import type { NavigationTreeNodeType } from 'ydb-ui-components' ;
@@ -46,6 +46,7 @@ import {
4646 dropViewTemplate ,
4747 manageAutoPartitioningTemplate ,
4848 selectQueryTemplate ,
49+ showCreateTableTemplate ,
4950 upsertQueryTemplate ,
5051} from './schemaQueryTemplates' ;
5152import type { YdbNavigationTreeProps } from './types' ;
@@ -128,6 +129,7 @@ const bindActions = (
128129 dropTable : inputQuery ( dropTableTemplate ) ,
129130 manageAutoPartitioning : inputQuery ( manageAutoPartitioningTemplate ) ,
130131 selectQuery : inputQuery ( selectQueryTemplate ) ,
132+ showCreateTable : inputQuery ( showCreateTableTemplate ) ,
131133 upsertQuery : inputQuery ( upsertQueryTemplate ) ,
132134 createExternalTable : inputQuery ( createExternalTableTemplate ) ,
133135 dropExternalTable : inputQuery ( dropExternalTableTemplate ) ,
@@ -244,6 +246,7 @@ export const getActions =
244246 } ,
245247 ] ,
246248 } ;
249+
247250 let DB_SET : ActionsSet = [ [ copyItem , connectToDBItem ] , createEntitiesSet ] ;
248251
249252 const DIR_SET : ActionsSet = [ [ copyItem ] , createEntitiesSet ] ;
@@ -263,6 +266,12 @@ export const getActions =
263266 DIR_SET . splice ( 1 , 0 , [ createDirectoryItem ] ) ;
264267 }
265268
269+ const showCreateTableItem = {
270+ text : i18n ( 'actions.showCreateTable' ) ,
271+ action : actions . showCreateTable ,
272+ iconStart : < Code /> ,
273+ } ;
274+
266275 const ROW_TABLE_SET : ActionsSet = [
267276 [ copyItem ] ,
268277 [
@@ -281,6 +290,7 @@ export const getActions =
281290 { text : i18n ( 'actions.addTableIndex' ) , action : actions . addTableIndex } ,
282291 { text : i18n ( 'actions.createCdcStream' ) , action : actions . createCdcStream } ,
283292 ] ,
293+ [ showCreateTableItem ] ,
284294 ] ;
285295 const COLUMN_TABLE_SET : ActionsSet = [
286296 [ copyItem ] ,
@@ -290,6 +300,7 @@ export const getActions =
290300 { text : i18n ( 'actions.selectQuery' ) , action : actions . selectQuery } ,
291301 { text : i18n ( 'actions.upsertQuery' ) , action : actions . upsertQuery } ,
292302 ] ,
303+ [ showCreateTableItem ] ,
293304 ] ;
294305
295306 const TOPIC_SET : ActionsSet = [
0 commit comments