@@ -9,13 +9,16 @@ import createToast from '../../../utils/createToast';
99import i18n from '../i18n' ;
1010
1111import {
12+ alterAsyncReplicationTemplate ,
1213 alterTableTemplate ,
1314 alterTopicTemplate ,
15+ createAsyncReplicationTemplate ,
1416 createColumnTableTemplate ,
1517 createExternalTableTemplate ,
1618 createTableTemplate ,
1719 createTopicTemplate ,
1820 createViewTemplate ,
21+ dropAsyncReplicationTemplate ,
1922 dropExternalTableTemplate ,
2023 dropTopicTemplate ,
2124 dropViewTemplate ,
@@ -49,6 +52,9 @@ const bindActions = (
4952 return {
5053 createTable : inputQuery ( createTableTemplate , 'script' ) ,
5154 createColumnTable : inputQuery ( createColumnTableTemplate , 'script' ) ,
55+ createAsyncReplication : inputQuery ( createAsyncReplicationTemplate , 'script' ) ,
56+ alterAsyncReplication : inputQuery ( alterAsyncReplicationTemplate , 'script' ) ,
57+ dropAsyncReplication : inputQuery ( dropAsyncReplicationTemplate , 'script' ) ,
5258 alterTable : inputQuery ( alterTableTemplate , 'script' ) ,
5359 selectQuery : inputQuery ( selectQueryTemplate ) ,
5460 upsertQuery : inputQuery ( upsertQueryTemplate ) ,
@@ -92,6 +98,10 @@ export const getActions =
9298 [
9399 { text : i18n ( 'actions.createTable' ) , action : actions . createTable } ,
94100 { text : i18n ( 'actions.createColumnTable' ) , action : actions . createColumnTable } ,
101+ {
102+ text : i18n ( 'actions.createAsyncReplication' ) ,
103+ action : actions . createAsyncReplication ,
104+ } ,
95105 { text : i18n ( 'actions.createTopic' ) , action : actions . createTopic } ,
96106 { text : i18n ( 'actions.createView' ) , action : actions . createView } ,
97107 ] ,
@@ -135,12 +145,20 @@ export const getActions =
135145 [ { text : i18n ( 'actions.dropView' ) , action : actions . dropView } ] ,
136146 ] ;
137147
148+ const ASYNC_REPLICATION_SET : ActionsSet = [
149+ [ copyItem ] ,
150+ [
151+ { text : i18n ( 'actions.alterReplication' ) , action : actions . alterAsyncReplication } ,
152+ { text : i18n ( 'actions.dropReplication' ) , action : actions . dropAsyncReplication } ,
153+ ] ,
154+ ] ;
155+
138156 const JUST_COPY : ActionsSet = [ copyItem ] ;
139157
140158 // verbose mapping to guarantee a correct actions set for new node types
141159 // TS will error when a new type is added in the lib but is not mapped here
142160 const nodeTypeToActions : Record < NavigationTreeNodeType , ActionsSet > = {
143- async_replication : JUST_COPY ,
161+ async_replication : ASYNC_REPLICATION_SET ,
144162
145163 database : DIR_SET ,
146164 directory : DIR_SET ,
0 commit comments