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 { useReleasePlans } from 'hooks/api/getters/useReleasePlans/useReleasePlans';
|
||||||
import { useChangeRequestsEnabled } from 'hooks/useChangeRequestsEnabled';
|
import { useChangeRequestsEnabled } from 'hooks/useChangeRequestsEnabled';
|
||||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||||
import { useUiFlag } from 'hooks/useUiFlag';
|
|
||||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||||
import { ReleasePlanReviewDialog } from '../../FeatureView/FeatureOverview/ReleasePlan/ReleasePlanReviewDialog.tsx';
|
import { ReleasePlanReviewDialog } from '../../FeatureView/FeatureOverview/ReleasePlan/ReleasePlanReviewDialog.tsx';
|
||||||
|
|
||||||
@ -76,7 +75,6 @@ export const FeatureStrategyMenu = ({
|
|||||||
const { refetch } = useReleasePlans(projectId, featureId, environmentId);
|
const { refetch } = useReleasePlans(projectId, featureId, environmentId);
|
||||||
const { addReleasePlanToFeature } = useReleasePlansApi();
|
const { addReleasePlanToFeature } = useReleasePlansApi();
|
||||||
const { isEnterprise } = useUiConfig();
|
const { isEnterprise } = useUiConfig();
|
||||||
const addConfigurationEnabled = useUiFlag('addConfiguration');
|
|
||||||
const displayReleasePlanButton = isEnterprise();
|
const displayReleasePlanButton = isEnterprise();
|
||||||
const crProtected = isChangeRequestConfigured(environmentId);
|
const crProtected = isChangeRequestConfigured(environmentId);
|
||||||
|
|
||||||
@ -160,13 +158,34 @@ export const FeatureStrategyMenu = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledStrategyMenu onClick={(event) => event.stopPropagation()}>
|
<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
|
<PermissionButton
|
||||||
data-testid='ADD_STRATEGY_BUTTON'
|
data-testid='ADD_STRATEGY_BUTTON'
|
||||||
permission={CREATE_FEATURE_STRATEGY}
|
permission={CREATE_FEATURE_STRATEGY}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
environmentId={environmentId}
|
environmentId={environmentId}
|
||||||
onClick={openMoreStrategies}
|
onClick={openDefaultStrategyCreationModal}
|
||||||
aria-labelledby={dialogId}
|
aria-labelledby={dialogId}
|
||||||
variant={variant}
|
variant={variant}
|
||||||
sx={{ minWidth: matchWidth ? '282px' : 'auto' }}
|
sx={{ minWidth: matchWidth ? '282px' : 'auto' }}
|
||||||
@ -175,66 +194,26 @@ export const FeatureStrategyMenu = ({
|
|||||||
title: disableReason ? disableReason : undefined,
|
title: disableReason ? disableReason : undefined,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Add configuration
|
{label}
|
||||||
</PermissionButton>
|
</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
|
<StyledAdditionalMenuButton
|
||||||
data-testid='ADD_STRATEGY_BUTTON'
|
permission={CREATE_FEATURE_STRATEGY}
|
||||||
permission={CREATE_FEATURE_STRATEGY}
|
projectId={projectId}
|
||||||
projectId={projectId}
|
environmentId={environmentId}
|
||||||
environmentId={environmentId}
|
onClick={openMoreStrategies}
|
||||||
onClick={openDefaultStrategyCreationModal}
|
variant='outlined'
|
||||||
aria-labelledby={dialogId}
|
hideLockIcon
|
||||||
variant={variant}
|
disabled={Boolean(disableReason)}
|
||||||
sx={{ minWidth: matchWidth ? '282px' : 'auto' }}
|
tooltipProps={{
|
||||||
disabled={Boolean(disableReason)}
|
title: disableReason
|
||||||
tooltipProps={{
|
? disableReason
|
||||||
title: disableReason ? disableReason : undefined,
|
: 'More strategies',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{label}
|
<MoreVert />
|
||||||
</PermissionButton>
|
</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
|
<Dialog
|
||||||
open={isStrategyMenuDialogOpen}
|
open={isStrategyMenuDialogOpen}
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
|
@ -87,7 +87,6 @@ export type UiFlags = {
|
|||||||
customMetrics?: boolean;
|
customMetrics?: boolean;
|
||||||
impactMetrics?: boolean;
|
impactMetrics?: boolean;
|
||||||
lifecycleGraphs?: boolean;
|
lifecycleGraphs?: boolean;
|
||||||
addConfiguration?: boolean;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface IVersionInfo {
|
export interface IVersionInfo {
|
||||||
|
@ -55,7 +55,6 @@ export type IFlagKey =
|
|||||||
| 'customMetrics'
|
| 'customMetrics'
|
||||||
| 'impactMetrics'
|
| 'impactMetrics'
|
||||||
| 'lifecycleGraphs'
|
| 'lifecycleGraphs'
|
||||||
| 'addConfiguration'
|
|
||||||
| 'etagByEnv'
|
| 'etagByEnv'
|
||||||
| 'fetchMode'
|
| 'fetchMode'
|
||||||
| 'optimizeLifecycle';
|
| 'optimizeLifecycle';
|
||||||
@ -250,10 +249,6 @@ const flags: IFlags = {
|
|||||||
process.env.UNLEASH_EXPERIMENTAL_LIFECYCLE_GRAPHS,
|
process.env.UNLEASH_EXPERIMENTAL_LIFECYCLE_GRAPHS,
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
addConfiguration: parseEnvVarBoolean(
|
|
||||||
process.env.UNLEASH_EXPERIMENTAL_ADD_CONFIGURATION,
|
|
||||||
false,
|
|
||||||
),
|
|
||||||
streaming: {
|
streaming: {
|
||||||
name: 'disabled',
|
name: 'disabled',
|
||||||
enabled: parseEnvVarBoolean(
|
enabled: parseEnvVarBoolean(
|
||||||
|
@ -53,7 +53,6 @@ process.nextTick(async () => {
|
|||||||
customMetrics: true,
|
customMetrics: true,
|
||||||
impactMetrics: true,
|
impactMetrics: true,
|
||||||
lifecycleGraphs: true,
|
lifecycleGraphs: true,
|
||||||
addConfiguration: true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
authentication: {
|
authentication: {
|
||||||
|
Loading…
Reference in New Issue
Block a user