11import React from 'react' ;
22import useAppParams from 'lib/hooks/useAppParams' ;
3- import { clusterConnectConnectorPath , ClusterNameRoute } from 'lib/paths' ;
3+ import { ClusterNameRoute } from 'lib/paths' ;
44import Table , { TagCell } from 'components/common/NewTable' ;
55import { FullConnectorInfo } from 'generated-sources' ;
66import { useConnectors } from 'lib/hooks/api/kafkaConnect' ;
77import { 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' ;
109import { useQueryPersister } from 'components/common/NewTable/ColumnFilter' ;
1110import { useLocalStoragePersister } from 'components/common/NewTable/ColumnResizer/lib' ;
11+ import BreakableTextCell from 'components/common/NewTable/BreakableTextCell' ;
1212
1313import ActionsCell from './ActionsCell' ;
1414import TopicsCell from './TopicsCell' ;
1515import RunningTasksCell from './RunningTasksCell' ;
16+ import { KafkaConnectLinkCell } from './KafkaConnectLinkCell' ;
1617
17- const kafkaConnectColumns : ColumnDef < FullConnectorInfo > [ ] = [
18+ const kafkaConnectColumns : ColumnDef < FullConnectorInfo , string > [ ] = [
1819 {
1920 header : 'Name' ,
2021 accessorKey : 'name' ,
21- cell : BreakableTextCell ,
22+ cell : KafkaConnectLinkCell ,
2223 enableResizing : true ,
2324 } ,
2425 {
@@ -77,7 +78,6 @@ const kafkaConnectColumns: ColumnDef<FullConnectorInfo>[] = [
7778] ;
7879
7980const List : React . FC = ( ) => {
80- const navigate = useNavigate ( ) ;
8181 const { clusterName } = useAppParams < ClusterNameRoute > ( ) ;
8282 const [ searchParams ] = useSearchParams ( ) ;
8383 const { data : connectors } = useConnectors (
@@ -95,9 +95,6 @@ const List: React.FC = () => {
9595 enableSorting
9696 enableColumnResizing
9797 columnSizingPersister = { columnSizingPersister }
98- onRowClick = { ( { original : { connect, name } } ) =>
99- navigate ( clusterConnectConnectorPath ( clusterName , connect , name ) )
100- }
10198 emptyMessage = "No connectors found"
10299 setRowId = { ( originalRow ) => `${ originalRow . name } -${ originalRow . connect } ` }
103100 filterPersister = { filterPersister }
0 commit comments