1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

chore: remove extended usage metrics ui flag (#6701)

This commit is contained in:
Mateusz Kwasniewski 2024-03-26 15:14:39 +01:00 committed by GitHub
parent 8e08df5c19
commit 6762703db9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 3 additions and 21 deletions

View File

@ -3,8 +3,8 @@ import GeneralSelect, {
type IGeneralSelectProps,
} from 'component/common/GeneralSelect/GeneralSelect';
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
import { useExtendedFeatureMetrics } from '../useExtendedFeatureMetrics';
import { useEffect } from 'react';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
const StyledTitle = styled('h2')(({ theme }) => ({
margin: 0,
@ -36,8 +36,8 @@ export const FeatureMetricsHours = ({
},
});
};
const extendedOptions = useExtendedFeatureMetrics();
const options = extendedOptions
const { isEnterprise } = useUiConfig();
const options = isEnterprise()
? [...hourOptions, ...daysOptions]
: hourOptions;

View File

@ -1,10 +0,0 @@
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { useUiFlag } from 'hooks/useUiFlag';
export const useExtendedFeatureMetrics = () => {
const { isEnterprise } = useUiConfig();
const extendedUsageMetrics = useUiFlag('extendedUsageMetricsUI');
const extendedOptions = isEnterprise() && extendedUsageMetrics;
return extendedOptions;
};

View File

@ -69,7 +69,6 @@ export type UiFlags = {
featureSearchFeedback?: Variant;
enableLicense?: boolean;
newStrategyConfigurationFeedback?: boolean;
extendedUsageMetricsUI?: boolean;
adminTokenKillSwitch?: boolean;
executiveDashboardUI?: boolean;
feedbackComments?: Variant;

View File

@ -96,7 +96,6 @@ exports[`should create default config 1`] = `
"executiveDashboard": false,
"executiveDashboardUI": false,
"extendedUsageMetrics": false,
"extendedUsageMetricsUI": false,
"featureSearchFeedback": {
"enabled": false,
"name": "withText",

View File

@ -36,7 +36,6 @@ export type IFlagKey =
| 'newStrategyConfigurationFeedback'
| 'edgeBulkMetrics'
| 'extendedUsageMetrics'
| 'extendedUsageMetricsUI'
| 'adminTokenKillSwitch'
| 'executiveDashboard'
| 'executiveDashboardUI'
@ -185,10 +184,6 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_EXTENDED_USAGE_METRICS,
false,
),
extendedUsageMetricsUI: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_EXTENDED_USAGE_METRICS_UI,
false,
),
adminTokenKillSwitch: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_ADMIN_TOKEN_KILL_SWITCH,
false,

View File

@ -46,7 +46,6 @@ process.nextTick(async () => {
increaseUnleashWidth: true,
newStrategyConfigurationFeedback: true,
featureSearchFeedbackPosting: true,
extendedUsageMetricsUI: true,
executiveDashboard: true,
executiveDashboardUI: true,
userAccessUIEnabled: true,