mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-24 17:51:14 +02:00
chore: Remove discarded addConfiguration
feature flag
This commit is contained in:
parent
ea4c0a0941
commit
5d82417980
@ -18,7 +18,6 @@ import { useReleasePlansApi } from 'hooks/api/actions/useReleasePlansApi/useRele
|
||||
import { useReleasePlans } from 'hooks/api/getters/useReleasePlans/useReleasePlans';
|
||||
import { useChangeRequestsEnabled } from 'hooks/useChangeRequestsEnabled';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
import { useUiFlag } from 'hooks/useUiFlag';
|
||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||
import { ReleasePlanReviewDialog } from '../../FeatureView/FeatureOverview/ReleasePlan/ReleasePlanReviewDialog.tsx';
|
||||
|
||||
@ -76,7 +75,6 @@ export const FeatureStrategyMenu = ({
|
||||
const { refetch } = useReleasePlans(projectId, featureId, environmentId);
|
||||
const { addReleasePlanToFeature } = useReleasePlansApi();
|
||||
const { isEnterprise } = useUiConfig();
|
||||
const addConfigurationEnabled = useUiFlag('addConfiguration');
|
||||
const displayReleasePlanButton = isEnterprise();
|
||||
const crProtected = isChangeRequestConfigured(environmentId);
|
||||
|
||||
@ -160,13 +158,34 @@ export const FeatureStrategyMenu = ({
|
||||
|
||||
return (
|
||||
<StyledStrategyMenu onClick={(event) => event.stopPropagation()}>
|
||||
{addConfigurationEnabled ? (
|
||||
<>
|
||||
{displayReleasePlanButton ? (
|
||||
<PermissionButton
|
||||
data-testid='ADD_TEMPLATE_BUTTON'
|
||||
permission={CREATE_FEATURE_STRATEGY}
|
||||
projectId={projectId}
|
||||
environmentId={environmentId}
|
||||
onClick={openReleasePlans}
|
||||
aria-labelledby={dialogId}
|
||||
variant='outlined'
|
||||
sx={{ minWidth: matchWidth ? '282px' : 'auto' }}
|
||||
disabled={Boolean(disableReason)}
|
||||
tooltipProps={{
|
||||
title: disableReason
|
||||
? disableReason
|
||||
: undefined,
|
||||
}}
|
||||
>
|
||||
Use template
|
||||
</PermissionButton>
|
||||
) : null}
|
||||
|
||||
<PermissionButton
|
||||
data-testid='ADD_STRATEGY_BUTTON'
|
||||
permission={CREATE_FEATURE_STRATEGY}
|
||||
projectId={projectId}
|
||||
environmentId={environmentId}
|
||||
onClick={openMoreStrategies}
|
||||
onClick={openDefaultStrategyCreationModal}
|
||||
aria-labelledby={dialogId}
|
||||
variant={variant}
|
||||
sx={{ minWidth: matchWidth ? '282px' : 'auto' }}
|
||||
@ -175,66 +194,26 @@ export const FeatureStrategyMenu = ({
|
||||
title: disableReason ? disableReason : undefined,
|
||||
}}
|
||||
>
|
||||
Add configuration
|
||||
{label}
|
||||
</PermissionButton>
|
||||
) : (
|
||||
<>
|
||||
{displayReleasePlanButton ? (
|
||||
<PermissionButton
|
||||
data-testid='ADD_TEMPLATE_BUTTON'
|
||||
permission={CREATE_FEATURE_STRATEGY}
|
||||
projectId={projectId}
|
||||
environmentId={environmentId}
|
||||
onClick={openReleasePlans}
|
||||
aria-labelledby={dialogId}
|
||||
variant='outlined'
|
||||
sx={{ minWidth: matchWidth ? '282px' : 'auto' }}
|
||||
disabled={Boolean(disableReason)}
|
||||
tooltipProps={{
|
||||
title: disableReason
|
||||
? disableReason
|
||||
: undefined,
|
||||
}}
|
||||
>
|
||||
Use template
|
||||
</PermissionButton>
|
||||
) : null}
|
||||
|
||||
<PermissionButton
|
||||
data-testid='ADD_STRATEGY_BUTTON'
|
||||
permission={CREATE_FEATURE_STRATEGY}
|
||||
projectId={projectId}
|
||||
environmentId={environmentId}
|
||||
onClick={openDefaultStrategyCreationModal}
|
||||
aria-labelledby={dialogId}
|
||||
variant={variant}
|
||||
sx={{ minWidth: matchWidth ? '282px' : 'auto' }}
|
||||
disabled={Boolean(disableReason)}
|
||||
tooltipProps={{
|
||||
title: disableReason ? disableReason : undefined,
|
||||
}}
|
||||
>
|
||||
{label}
|
||||
</PermissionButton>
|
||||
|
||||
<StyledAdditionalMenuButton
|
||||
permission={CREATE_FEATURE_STRATEGY}
|
||||
projectId={projectId}
|
||||
environmentId={environmentId}
|
||||
onClick={openMoreStrategies}
|
||||
variant='outlined'
|
||||
hideLockIcon
|
||||
disabled={Boolean(disableReason)}
|
||||
tooltipProps={{
|
||||
title: disableReason
|
||||
? disableReason
|
||||
: 'More strategies',
|
||||
}}
|
||||
>
|
||||
<MoreVert />
|
||||
</StyledAdditionalMenuButton>
|
||||
</>
|
||||
)}
|
||||
<StyledAdditionalMenuButton
|
||||
permission={CREATE_FEATURE_STRATEGY}
|
||||
projectId={projectId}
|
||||
environmentId={environmentId}
|
||||
onClick={openMoreStrategies}
|
||||
variant='outlined'
|
||||
hideLockIcon
|
||||
disabled={Boolean(disableReason)}
|
||||
tooltipProps={{
|
||||
title: disableReason
|
||||
? disableReason
|
||||
: 'More strategies',
|
||||
}}
|
||||
>
|
||||
<MoreVert />
|
||||
</StyledAdditionalMenuButton>
|
||||
</>
|
||||
<Dialog
|
||||
open={isStrategyMenuDialogOpen}
|
||||
onClose={onClose}
|
||||
|
@ -87,7 +87,6 @@ export type UiFlags = {
|
||||
customMetrics?: boolean;
|
||||
impactMetrics?: boolean;
|
||||
lifecycleGraphs?: boolean;
|
||||
addConfiguration?: boolean;
|
||||
};
|
||||
|
||||
export interface IVersionInfo {
|
||||
|
@ -55,7 +55,6 @@ export type IFlagKey =
|
||||
| 'customMetrics'
|
||||
| 'impactMetrics'
|
||||
| 'lifecycleGraphs'
|
||||
| 'addConfiguration'
|
||||
| 'etagByEnv'
|
||||
| 'fetchMode'
|
||||
| 'optimizeLifecycle';
|
||||
@ -250,10 +249,6 @@ const flags: IFlags = {
|
||||
process.env.UNLEASH_EXPERIMENTAL_LIFECYCLE_GRAPHS,
|
||||
false,
|
||||
),
|
||||
addConfiguration: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_ADD_CONFIGURATION,
|
||||
false,
|
||||
),
|
||||
streaming: {
|
||||
name: 'disabled',
|
||||
enabled: parseEnvVarBoolean(
|
||||
|
@ -53,7 +53,6 @@ process.nextTick(async () => {
|
||||
customMetrics: true,
|
||||
impactMetrics: true,
|
||||
lifecycleGraphs: true,
|
||||
addConfiguration: true,
|
||||
},
|
||||
},
|
||||
authentication: {
|
||||
|
Loading…
Reference in New Issue
Block a user