@@ -5,19 +5,13 @@ import MenuTab from 'components/Nav/Menu/MenuTab';
5
5
import MenuItem from 'components/Nav/Menu/MenuItem' ;
6
6
import {
7
7
clusterACLPath ,
8
- clusterAclRelativePath ,
9
- clusterBrokerRelativePath ,
8
+ clusterBrokerPath ,
10
9
clusterBrokersPath ,
11
10
clusterConnectorsPath ,
12
- clusterConnectorsRelativePath ,
13
11
clusterConsumerGroupsPath ,
14
- clusterConsumerGroupsRelativePath ,
15
12
clusterKsqlDbPath ,
16
- clusterKsqlDbRelativePath ,
17
13
clusterSchemasPath ,
18
- clusterSchemasRelativePath ,
19
14
clusterTopicsPath ,
20
- clusterTopicsRelativePath ,
21
15
} from 'lib/paths' ;
22
16
import { useLocation } from 'react-router-dom' ;
23
17
import { useLocalStorage } from 'lib/hooks/useLocalStorage' ;
@@ -60,45 +54,45 @@ const ClusterMenu: FC<ClusterMenuProps> = ({
60
54
{ isOpen && (
61
55
< S . List >
62
56
< MenuItem
63
- isActive = { getIsMenuItemActive ( clusterBrokerRelativePath ) }
57
+ isActive = { getIsMenuItemActive ( clusterBrokerPath ( name ) ) }
64
58
to = { clusterBrokersPath ( name ) }
65
59
title = "Brokers"
66
60
/>
67
61
< MenuItem
68
- isActive = { getIsMenuItemActive ( clusterTopicsRelativePath ) }
62
+ isActive = { getIsMenuItemActive ( clusterTopicsPath ( name ) ) }
69
63
to = { clusterTopicsPath ( name ) }
70
64
title = "Topics"
71
65
/>
72
66
< MenuItem
73
- isActive = { getIsMenuItemActive ( clusterConsumerGroupsRelativePath ) }
67
+ isActive = { getIsMenuItemActive ( clusterConsumerGroupsPath ( name ) ) }
74
68
to = { clusterConsumerGroupsPath ( name ) }
75
69
title = "Consumers"
76
70
/>
77
71
{ hasFeatureConfigured ( ClusterFeaturesEnum . SCHEMA_REGISTRY ) && (
78
72
< MenuItem
79
- isActive = { getIsMenuItemActive ( clusterSchemasRelativePath ) }
73
+ isActive = { getIsMenuItemActive ( clusterSchemasPath ( name ) ) }
80
74
to = { clusterSchemasPath ( name ) }
81
75
title = "Schema Registry"
82
76
/>
83
77
) }
84
78
{ hasFeatureConfigured ( ClusterFeaturesEnum . KAFKA_CONNECT ) && (
85
79
< MenuItem
86
- isActive = { getIsMenuItemActive ( clusterConnectorsRelativePath ) }
80
+ isActive = { getIsMenuItemActive ( clusterConnectorsPath ( name ) ) }
87
81
to = { clusterConnectorsPath ( name ) }
88
82
title = "Kafka Connect"
89
83
/>
90
84
) }
91
85
{ hasFeatureConfigured ( ClusterFeaturesEnum . KSQL_DB ) && (
92
86
< MenuItem
93
- isActive = { getIsMenuItemActive ( clusterKsqlDbRelativePath ) }
87
+ isActive = { getIsMenuItemActive ( clusterKsqlDbPath ( name ) ) }
94
88
to = { clusterKsqlDbPath ( name ) }
95
89
title = "KSQL DB"
96
90
/>
97
91
) }
98
92
{ ( hasFeatureConfigured ( ClusterFeaturesEnum . KAFKA_ACL_VIEW ) ||
99
93
hasFeatureConfigured ( ClusterFeaturesEnum . KAFKA_ACL_EDIT ) ) && (
100
94
< MenuItem
101
- isActive = { getIsMenuItemActive ( clusterAclRelativePath ) }
95
+ isActive = { getIsMenuItemActive ( clusterACLPath ( name ) ) }
102
96
to = { clusterACLPath ( name ) }
103
97
title = "ACL"
104
98
/>
0 commit comments