1
1
import React from 'react' ;
2
2
import useAppParams from 'lib/hooks/useAppParams' ;
3
- import { clusterConnectConnectorPath , ClusterNameRoute } from 'lib/paths' ;
3
+ import { ClusterNameRoute } from 'lib/paths' ;
4
4
import Table , { TagCell } from 'components/common/NewTable' ;
5
5
import { FullConnectorInfo } from 'generated-sources' ;
6
6
import { useConnectors } from 'lib/hooks/api/kafkaConnect' ;
7
7
import { ColumnDef } from '@tanstack/react-table' ;
8
- import { useNavigate , useSearchParams } from 'react-router-dom' ;
9
- import BreakableTextCell from 'components/common/NewTable/BreakableTextCell' ;
8
+ import { useSearchParams } from 'react-router-dom' ;
10
9
import { useQueryPersister } from 'components/common/NewTable/ColumnFilter' ;
11
10
import { useLocalStoragePersister } from 'components/common/NewTable/ColumnResizer/lib' ;
12
11
13
12
import ActionsCell from './ActionsCell' ;
14
13
import TopicsCell from './TopicsCell' ;
15
14
import RunningTasksCell from './RunningTasksCell' ;
15
+ import { KafkaConnectLinkCell } from './KafkaConnectLinkCell' ;
16
16
17
- const kafkaConnectColumns : ColumnDef < FullConnectorInfo > [ ] = [
17
+ const kafkaConnectColumns : ColumnDef < FullConnectorInfo , string > [ ] = [
18
18
{
19
19
header : 'Name' ,
20
20
accessorKey : 'name' ,
21
- cell : BreakableTextCell ,
21
+ cell : KafkaConnectLinkCell ,
22
22
enableResizing : true ,
23
23
} ,
24
24
{
25
25
header : 'Connect' ,
26
26
accessorKey : 'connect' ,
27
- cell : BreakableTextCell ,
27
+ cell : KafkaConnectLinkCell ,
28
28
filterFn : 'arrIncludesSome' ,
29
29
meta : {
30
30
filterVariant : 'multi-select' ,
@@ -34,14 +34,15 @@ const kafkaConnectColumns: ColumnDef<FullConnectorInfo>[] = [
34
34
{
35
35
header : 'Type' ,
36
36
accessorKey : 'type' ,
37
+ cell : KafkaConnectLinkCell ,
37
38
meta : { filterVariant : 'multi-select' } ,
38
39
filterFn : 'arrIncludesSome' ,
39
40
size : 120 ,
40
41
} ,
41
42
{
42
43
header : 'Plugin' ,
43
44
accessorKey : 'connectorClass' ,
44
- cell : BreakableTextCell ,
45
+ cell : KafkaConnectLinkCell ,
45
46
meta : { filterVariant : 'multi-select' } ,
46
47
filterFn : 'arrIncludesSome' ,
47
48
enableResizing : true ,
@@ -77,7 +78,6 @@ const kafkaConnectColumns: ColumnDef<FullConnectorInfo>[] = [
77
78
] ;
78
79
79
80
const List : React . FC = ( ) => {
80
- const navigate = useNavigate ( ) ;
81
81
const { clusterName } = useAppParams < ClusterNameRoute > ( ) ;
82
82
const [ searchParams ] = useSearchParams ( ) ;
83
83
const { data : connectors } = useConnectors (
@@ -95,9 +95,6 @@ const List: React.FC = () => {
95
95
enableSorting
96
96
enableColumnResizing
97
97
columnSizingPersister = { columnSizingPersister }
98
- onRowClick = { ( { original : { connect, name } } ) =>
99
- navigate ( clusterConnectConnectorPath ( clusterName , connect , name ) )
100
- }
101
98
emptyMessage = "No connectors found"
102
99
setRowId = { ( originalRow ) => `${ originalRow . name } -${ originalRow . connect } ` }
103
100
filterPersister = { filterPersister }
0 commit comments