@@ -7,7 +7,6 @@ import { FeatureToggleActions } from 'store/featureToggle';
7
7
// eslint-disable-next-line no-shadow
8
8
export const enum FeatureToggle {
9
9
awsEc2Instances = 'cost-management.ui.aws-ec2-instances' , // https://issues.redhat.com/browse/COST-4855
10
- clusterInfo = 'cost-management.ui.cluster.info' , // https://issues.redhat.com/browse/COST-4559
11
10
debug = 'cost-management.ui.debug' ,
12
11
exports = 'cost-management.ui.exports' , // Async exports https://issues.redhat.com/browse/COST-2223
13
12
finsights = 'cost-management.ui.finsights' , // RHEL support for FINsights https://issues.redhat.com/browse/COST-3306
@@ -16,8 +15,6 @@ export const enum FeatureToggle {
16
15
ocpProjectStorage = 'cost-management.ui.ocp-project-storage' , // https://issues.redhat.com/browse/COST-4856
17
16
ros = 'cost-management.ui.ros' , // ROS support https://issues.redhat.com/browse/COST-3477
18
17
rosBeta = 'cost-management.ui.ros-beta' , // ROS support https://issues.redhat.com/browse/COST-3477
19
- settingsPlatform = 'cost-management.ui.settings.platform' , // Platform projects https://issues.redhat.com/browse/COST-3818
20
- tagMapping = 'cost-management.ui.tag.mapping' , // https://issues.redhat.com/browse/COST-3824
21
18
}
22
19
23
20
const useIsToggleEnabled = ( toggle : FeatureToggle ) => {
@@ -33,10 +30,6 @@ export const useIsDebugToggleEnabled = () => {
33
30
return useIsToggleEnabled ( FeatureToggle . debug ) ;
34
31
} ;
35
32
36
- export const useIsClusterInfoToggleEnabled = ( ) => {
37
- return useIsToggleEnabled ( FeatureToggle . clusterInfo ) ;
38
- } ;
39
-
40
33
export const useIsExportsToggleEnabled = ( ) => {
41
34
return useIsToggleEnabled ( FeatureToggle . exports ) ;
42
35
} ;
@@ -64,30 +57,19 @@ export const useIsRosToggleEnabled = () => {
64
57
return isRosToggleEnabled || isRosFeatureBetaEnabled ;
65
58
} ;
66
59
67
- export const useIsSettingsPlatformToggleEnabled = ( ) => {
68
- return useIsToggleEnabled ( FeatureToggle . settingsPlatform ) ;
69
- } ;
70
-
71
- export const useIsTagMappingToggleEnabled = ( ) => {
72
- return useIsToggleEnabled ( FeatureToggle . tagMapping ) ;
73
- } ;
74
-
75
60
// The FeatureToggle component saves feature toggles in store for places where Unleash hooks not available
76
61
export const useFeatureToggle = ( ) => {
77
62
const dispatch = useDispatch ( ) ;
78
63
const { auth } = useChrome ( ) ;
79
64
80
65
const isAwsEc2InstancesToggleEnabled = useIsAwsEc2InstancesToggleEnabled ( ) ;
81
- const isClusterInfoToggleEnabled = useIsClusterInfoToggleEnabled ( ) ;
82
66
const isDebugToggleEnabled = useIsDebugToggleEnabled ( ) ;
83
67
const isExportsToggleEnabled = useIsExportsToggleEnabled ( ) ;
84
68
const isFinsightsToggleEnabled = useIsFinsightsToggleEnabled ( ) ;
85
69
const isIbmToggleEnabled = useIsIbmToggleEnabled ( ) ;
86
70
const isOcpCloudNetworkingToggleEnabled = useIsOcpCloudNetworkingToggleEnabled ( ) ;
87
71
const isOcpProjectStorageToggleEnabled = useIsOcpProjectStorageToggleEnabled ( ) ;
88
72
const isRosToggleEnabled = useIsRosToggleEnabled ( ) ;
89
- const isSettingsPlatformToggleEnabled = useIsSettingsPlatformToggleEnabled ( ) ;
90
- const isTagMappingToggleEnabled = useIsTagMappingToggleEnabled ( ) ;
91
73
92
74
const fetchUser = callback => {
93
75
auth . getUser ( ) . then ( user => {
@@ -100,16 +82,13 @@ export const useFeatureToggle = () => {
100
82
dispatch (
101
83
FeatureToggleActions . setFeatureToggle ( {
102
84
isAwsEc2InstancesToggleEnabled,
103
- isClusterInfoToggleEnabled,
104
85
isDebugToggleEnabled,
105
86
isExportsToggleEnabled,
106
87
isFinsightsToggleEnabled,
107
88
isIbmToggleEnabled,
108
89
isOcpCloudNetworkingToggleEnabled,
109
90
isOcpProjectStorageToggleEnabled,
110
91
isRosToggleEnabled,
111
- isSettingsPlatformToggleEnabled,
112
- isTagMappingToggleEnabled,
113
92
} )
114
93
) ;
115
94
if ( isDebugToggleEnabled ) {
@@ -118,16 +97,13 @@ export const useFeatureToggle = () => {
118
97
}
119
98
} , [
120
99
isAwsEc2InstancesToggleEnabled ,
121
- isClusterInfoToggleEnabled ,
122
100
isDebugToggleEnabled ,
123
101
isExportsToggleEnabled ,
124
102
isFinsightsToggleEnabled ,
125
103
isIbmToggleEnabled ,
126
104
isOcpCloudNetworkingToggleEnabled ,
127
105
isOcpProjectStorageToggleEnabled ,
128
106
isRosToggleEnabled ,
129
- isSettingsPlatformToggleEnabled ,
130
- isTagMappingToggleEnabled ,
131
107
] ) ;
132
108
} ;
133
109
0 commit comments