Skip to content

Commit 0a5fd5e

Browse files
committed
FE: Small fix active navigation for connect
1 parent d23380a commit 0a5fd5e

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

frontend/src/components/Connect/List/List.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import useAppParams from 'lib/hooks/useAppParams';
33
import { clusterConnectConnectorPath, ClusterNameRoute } from 'lib/paths';
4-
import Table, { LinkCell, TagCell } from 'components/common/NewTable';
4+
import Table, { TagCell } from 'components/common/NewTable';
55
import { FullConnectorInfo } from 'generated-sources';
66
import { useConnectors } from 'lib/hooks/api/kafkaConnect';
77
import { ColumnDef } from '@tanstack/react-table';
@@ -18,14 +18,7 @@ const kafkaConnectColumns: ColumnDef<FullConnectorInfo>[] = [
1818
{
1919
header: 'Name',
2020
accessorKey: 'name',
21-
// cell: BreakableTextCell,
22-
cell: ({ getValue }) => (
23-
<LinkCell
24-
wordBreak
25-
value={`${getValue<string | number>()}`}
26-
to={encodeURIComponent(`${getValue<string | number>()}`)}
27-
/>
28-
),
21+
cell: BreakableTextCell,
2922
enableResizing: true,
3023
},
3124
{

frontend/src/components/Nav/ClusterMenu/ClusterMenu.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
clusterACLPath,
88
clusterBrokersPath,
99
clusterConnectorsPath,
10+
clusterConnectsPath,
1011
clusterConsumerGroupsPath,
1112
clusterKsqlDbPath,
1213
clusterSchemasPath,
@@ -81,7 +82,10 @@ const ClusterMenu: FC<ClusterMenuProps> = ({
8182
)}
8283
{hasFeatureConfigured(ClusterFeaturesEnum.KAFKA_CONNECT) && (
8384
<MenuItem
84-
isActive={getIsMenuItemActive(clusterConnectorsPath(name))}
85+
isActive={
86+
getIsMenuItemActive(clusterConnectorsPath(name)) ||
87+
getIsMenuItemActive(clusterConnectsPath(name))
88+
}
8589
to={clusterConnectorsPath(name)}
8690
title="Kafka Connect"
8791
/>

frontend/src/lib/paths.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,12 @@ export const clusterConnectsPath = (
219219
export const clusterConnectorsPath = (
220220
clusterName: ClusterName = RouteParams.clusterName
221221
) => `${clusterPath(clusterName)}/connectors`;
222+
export const clusterConnectorNameSubPath = (
223+
clusterName: ClusterName = RouteParams.connectorName
224+
) => {
225+
return `${clusterName}/connectors`;
226+
};
227+
222228
export const clusterConnectorNewPath = (
223229
clusterName: ClusterName = RouteParams.clusterName
224230
) => `${clusterConnectorsPath(clusterName)}/create-new`;

0 commit comments

Comments
 (0)