Skip to content

Commit

Permalink
chore: remove extended usage metrics ui flag (#6701)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Mar 26, 2024
1 parent 8e08df5 commit 6762703
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 21 deletions.
Expand Up @@ -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,
Expand Down Expand Up @@ -36,8 +36,8 @@ export const FeatureMetricsHours = ({
},
});
};
const extendedOptions = useExtendedFeatureMetrics();
const options = extendedOptions
const { isEnterprise } = useUiConfig();
const options = isEnterprise()
? [...hourOptions, ...daysOptions]
: hourOptions;

Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion frontend/src/interfaces/uiConfig.ts
Expand Up @@ -69,7 +69,6 @@ export type UiFlags = {
featureSearchFeedback?: Variant;
enableLicense?: boolean;
newStrategyConfigurationFeedback?: boolean;
extendedUsageMetricsUI?: boolean;
adminTokenKillSwitch?: boolean;
executiveDashboardUI?: boolean;
feedbackComments?: Variant;
Expand Down
1 change: 0 additions & 1 deletion src/lib/__snapshots__/create-config.test.ts.snap
Expand Up @@ -96,7 +96,6 @@ exports[`should create default config 1`] = `
"executiveDashboard": false,
"executiveDashboardUI": false,
"extendedUsageMetrics": false,
"extendedUsageMetricsUI": false,
"featureSearchFeedback": {
"enabled": false,
"name": "withText",
Expand Down
5 changes: 0 additions & 5 deletions src/lib/types/experimental.ts
Expand Up @@ -36,7 +36,6 @@ export type IFlagKey =
| 'newStrategyConfigurationFeedback'
| 'edgeBulkMetrics'
| 'extendedUsageMetrics'
| 'extendedUsageMetricsUI'
| 'adminTokenKillSwitch'
| 'executiveDashboard'
| 'executiveDashboardUI'
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/server-dev.ts
Expand Up @@ -46,7 +46,6 @@ process.nextTick(async () => {
increaseUnleashWidth: true,
newStrategyConfigurationFeedback: true,
featureSearchFeedbackPosting: true,
extendedUsageMetricsUI: true,
executiveDashboard: true,
executiveDashboardUI: true,
userAccessUIEnabled: true,
Expand Down

0 comments on commit 6762703

Please sign in to comment.