mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
parent
d9e631c326
commit
b3dd460d2f
@ -75,7 +75,7 @@ test('should load the table', async () => {
|
|||||||
await screen.findByText('someFeature');
|
await screen.findByText('someFeature');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should show confirm dialog when reviving toggle', async () => {
|
test('should show confirm dialog when reviving flag', async () => {
|
||||||
setupApi();
|
setupApi();
|
||||||
render(
|
render(
|
||||||
<>
|
<>
|
||||||
@ -100,7 +100,7 @@ test('should show confirm dialog when reviving toggle', async () => {
|
|||||||
await screen.findByText("And we're back!");
|
await screen.findByText("And we're back!");
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should show confirm dialog when batch reviving toggle', async () => {
|
test('should show confirm dialog when batch reviving flag', async () => {
|
||||||
setupApi();
|
setupApi();
|
||||||
render(
|
render(
|
||||||
<>
|
<>
|
||||||
|
@ -308,14 +308,13 @@ export const ArchiveTable = ({
|
|||||||
condition={searchValue?.length > 0}
|
condition={searchValue?.length > 0}
|
||||||
show={
|
show={
|
||||||
<TablePlaceholder>
|
<TablePlaceholder>
|
||||||
No feature toggles found matching “
|
No feature flags found matching “
|
||||||
{searchValue}”
|
{searchValue}”
|
||||||
</TablePlaceholder>
|
</TablePlaceholder>
|
||||||
}
|
}
|
||||||
elseShow={
|
elseShow={
|
||||||
<TablePlaceholder>
|
<TablePlaceholder>
|
||||||
None of the feature toggles were archived
|
None of the feature flags were archived yet.
|
||||||
yet.
|
|
||||||
</TablePlaceholder>
|
</TablePlaceholder>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -37,7 +37,7 @@ export const ArchivedFeatureDeleteConfirm = ({
|
|||||||
const { setToastData, setToastApiError } = useToast();
|
const { setToastData, setToastApiError } = useToast();
|
||||||
const { deleteFeatures } = useProjectApi();
|
const { deleteFeatures } = useProjectApi();
|
||||||
|
|
||||||
const singularOrPluralToggles =
|
const singularOrPluralFlags =
|
||||||
deletedFeatures.length > 1 ? 'toggles' : 'toggle';
|
deletedFeatures.length > 1 ? 'toggles' : 'toggle';
|
||||||
|
|
||||||
const onDeleteFeatureToggle = async () => {
|
const onDeleteFeatureToggle = async () => {
|
||||||
@ -50,8 +50,8 @@ export const ArchivedFeatureDeleteConfirm = ({
|
|||||||
await refetch();
|
await refetch();
|
||||||
setToastData({
|
setToastData({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
title: `Feature ${singularOrPluralToggles} deleted`,
|
title: `Feature ${singularOrPluralFlags} deleted`,
|
||||||
text: `You have successfully deleted the following feature ${singularOrPluralToggles}: ${deletedFeatures.join(
|
text: `You have successfully deleted the following feature ${singularOrPluralFlags}: ${deletedFeatures.join(
|
||||||
', ',
|
', ',
|
||||||
)}.`,
|
)}.`,
|
||||||
});
|
});
|
||||||
@ -71,9 +71,9 @@ export const ArchivedFeatureDeleteConfirm = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialogue
|
<Dialogue
|
||||||
title={`Delete feature ${singularOrPluralToggles}?`}
|
title={`Delete feature ${singularOrPluralFlags}?`}
|
||||||
open={open}
|
open={open}
|
||||||
primaryButtonText={`Delete feature ${singularOrPluralToggles}`}
|
primaryButtonText={`Delete feature ${singularOrPluralFlags}`}
|
||||||
secondaryButtonText='Cancel'
|
secondaryButtonText='Cancel'
|
||||||
onClick={onDeleteFeatureToggle}
|
onClick={onDeleteFeatureToggle}
|
||||||
onClose={clearModal}
|
onClose={clearModal}
|
||||||
@ -81,22 +81,22 @@ export const ArchivedFeatureDeleteConfirm = ({
|
|||||||
formId={formId}
|
formId={formId}
|
||||||
>
|
>
|
||||||
<Alert severity='warning'>
|
<Alert severity='warning'>
|
||||||
<b>Warning!</b> Before you delete a feature toggle, make sure
|
<b>Warning!</b> Before you delete a feature flag, make sure all
|
||||||
all in-code references to that feature toggle have been removed.
|
in-code references to that feature flag have been removed.
|
||||||
Otherwise, a new feature toggle with the same name could
|
Otherwise, a new feature flag with the same name could activate
|
||||||
activate the old code paths.
|
the old code paths.
|
||||||
</Alert>
|
</Alert>
|
||||||
|
|
||||||
<StyledDeleteParagraph>
|
<StyledDeleteParagraph>
|
||||||
You are about to delete the following feature{' '}
|
You are about to delete the following feature{' '}
|
||||||
{singularOrPluralToggles}:{' '}
|
{singularOrPluralFlags}:{' '}
|
||||||
<strong>{deletedFeatures.join(', ')}</strong>.
|
<strong>{deletedFeatures.join(', ')}</strong>.
|
||||||
</StyledDeleteParagraph>
|
</StyledDeleteParagraph>
|
||||||
|
|
||||||
<StyledDeleteParagraph
|
<StyledDeleteParagraph
|
||||||
sx={(theme) => ({ marginTop: theme.spacing(2) })}
|
sx={(theme) => ({ marginTop: theme.spacing(2) })}
|
||||||
>
|
>
|
||||||
In order to delete the feature {singularOrPluralToggles}, please
|
In order to delete the feature {singularOrPluralFlags}, please
|
||||||
enter the following confirmation text in the text field below:{' '}
|
enter the following confirmation text in the text field below:{' '}
|
||||||
<strong>I want to delete</strong>
|
<strong>I want to delete</strong>
|
||||||
</StyledDeleteParagraph>
|
</StyledDeleteParagraph>
|
||||||
|
@ -78,7 +78,7 @@ export const ArchivedFeatureReviveConfirm = ({
|
|||||||
show={
|
show={
|
||||||
<>
|
<>
|
||||||
<StyledParagraph>
|
<StyledParagraph>
|
||||||
You are about to revive feature toggles:
|
You are about to revive feature flags:
|
||||||
</StyledParagraph>
|
</StyledParagraph>
|
||||||
<ul>
|
<ul>
|
||||||
{revivedFeatures.map((name) => (
|
{revivedFeatures.map((name) => (
|
||||||
@ -89,7 +89,7 @@ export const ArchivedFeatureReviveConfirm = ({
|
|||||||
}
|
}
|
||||||
elseShow={
|
elseShow={
|
||||||
<StyledParagraph>
|
<StyledParagraph>
|
||||||
You are about to revive feature toggle:{' '}
|
You are about to revive feature flag:{' '}
|
||||||
{revivedFeatures[0]}
|
{revivedFeatures[0]}
|
||||||
</StyledParagraph>
|
</StyledParagraph>
|
||||||
}
|
}
|
||||||
|
@ -293,5 +293,5 @@ test('add flag change to pending change request', async () => {
|
|||||||
|
|
||||||
await changeFlag('production');
|
await changeFlag('production');
|
||||||
|
|
||||||
await verifyChangeRequestDialog('Enable feature toggle test in production');
|
await verifyChangeRequestDialog('Enable feature flag test in production');
|
||||||
}, 10000);
|
}, 10000);
|
||||||
|
@ -49,7 +49,7 @@ export const ChangeRequest: VFC<IChangeRequestProps> = ({
|
|||||||
condition={changeRequest.features.length > 0}
|
condition={changeRequest.features.length > 0}
|
||||||
show={
|
show={
|
||||||
<Typography variant='body2' color='text.secondary'>
|
<Typography variant='body2' color='text.secondary'>
|
||||||
You request changes for these feature toggles:
|
You request changes for these feature flags:
|
||||||
</Typography>
|
</Typography>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -49,7 +49,7 @@ export const FeatureToggleChanges: FC<IFeatureToggleChanges> = ({
|
|||||||
px: 3,
|
px: 3,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography>Feature toggle name: </Typography>
|
<Typography>Feature flag name: </Typography>
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
component={RouterLink}
|
component={RouterLink}
|
||||||
|
@ -12,7 +12,7 @@ export const UpdateEnabledMessage = ({
|
|||||||
environment,
|
environment,
|
||||||
}: UpdateEnabledMsg) => (
|
}: UpdateEnabledMsg) => (
|
||||||
<Typography data-testid='update-enabled-message'>
|
<Typography data-testid='update-enabled-message'>
|
||||||
<strong>{enabled ? 'Enable' : 'Disable'}</strong> feature toggle{' '}
|
<strong>{enabled ? 'Enable' : 'Disable'}</strong> feature flag{' '}
|
||||||
<strong>{featureName}</strong> in <strong>{environment}</strong>
|
<strong>{featureName}</strong> in <strong>{environment}</strong>
|
||||||
</Typography>
|
</Typography>
|
||||||
);
|
);
|
||||||
|
@ -52,7 +52,7 @@ export const EnvironmentDeleteDialog = ({
|
|||||||
caution.
|
caution.
|
||||||
</strong>{' '}
|
</strong>{' '}
|
||||||
Deleting this environment will result in removing all strategies
|
Deleting this environment will result in removing all strategies
|
||||||
that are active in this environment across all feature toggles.
|
that are active in this environment across all feature flags.
|
||||||
</Alert>
|
</Alert>
|
||||||
|
|
||||||
<EnvironmentTableSingle
|
<EnvironmentTableSingle
|
||||||
|
@ -92,8 +92,8 @@ export const EnvironmentTable = () => {
|
|||||||
<PageContent header={header}>
|
<PageContent header={header}>
|
||||||
<StyledAlert severity='info'>
|
<StyledAlert severity='info'>
|
||||||
This is the order of environments that you have today in each
|
This is the order of environments that you have today in each
|
||||||
feature toggle. Rearranging them here will change also the order
|
feature flag. Rearranging them here will change also the order
|
||||||
inside each feature toggle.
|
inside each feature flag.
|
||||||
</StyledAlert>
|
</StyledAlert>
|
||||||
<SearchHighlightProvider value={globalFilter}>
|
<SearchHighlightProvider value={globalFilter}>
|
||||||
<Table {...getTableProps()} rowHeight='compact'>
|
<Table {...getTableProps()} rowHeight='compact'>
|
||||||
|
@ -70,7 +70,7 @@ export const CopyFeatureToggle = () => {
|
|||||||
const [replaceGroupId, setReplaceGroupId] = useState(true);
|
const [replaceGroupId, setReplaceGroupId] = useState(true);
|
||||||
const [apiError, setApiError] = useState('');
|
const [apiError, setApiError] = useState('');
|
||||||
const [nameError, setNameError] = useState<string | undefined>();
|
const [nameError, setNameError] = useState<string | undefined>();
|
||||||
const [newToggleName, setNewToggleName] = useState<string>();
|
const [newToggleName, setnewToggleName] = useState<string>();
|
||||||
const { cloneFeatureToggle, validateFeatureToggleName } = useFeatureApi();
|
const { cloneFeatureToggle, validateFeatureToggleName } = useFeatureApi();
|
||||||
const featureId = useRequiredPathParam('featureId');
|
const featureId = useRequiredPathParam('featureId');
|
||||||
const projectId = useRequiredPathParam('projectId');
|
const projectId = useRequiredPathParam('projectId');
|
||||||
@ -85,7 +85,7 @@ export const CopyFeatureToggle = () => {
|
|||||||
|
|
||||||
const setValue: ChangeEventHandler<HTMLInputElement> = (event) => {
|
const setValue: ChangeEventHandler<HTMLInputElement> = (event) => {
|
||||||
const value = trim(event.target.value);
|
const value = trim(event.target.value);
|
||||||
setNewToggleName(value);
|
setnewToggleName(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
const toggleReplaceGroupId = () => {
|
const toggleReplaceGroupId = () => {
|
||||||
@ -148,12 +148,12 @@ export const CopyFeatureToggle = () => {
|
|||||||
/>
|
/>
|
||||||
<StyledSection>
|
<StyledSection>
|
||||||
<StyledDescription>
|
<StyledDescription>
|
||||||
You are about to create a new feature toggle by cloning the
|
You are about to create a new feature flag by cloning the
|
||||||
configuration of feature toggle
|
configuration of feature flag
|
||||||
<Link to={getTogglePath(projectId, featureId)}>
|
<Link to={getTogglePath(projectId, featureId)}>
|
||||||
{featureId}
|
{featureId}
|
||||||
</Link>
|
</Link>
|
||||||
. You must give the new feature toggle a unique name before
|
. You must give the new feature flag a unique name before
|
||||||
you can proceed.
|
you can proceed.
|
||||||
</StyledDescription>
|
</StyledDescription>
|
||||||
|
|
||||||
|
@ -165,13 +165,13 @@ const FeatureForm: React.FC<IFeatureToggleForm> = ({
|
|||||||
onBlur={validateToggleName}
|
onBlur={validateToggleName}
|
||||||
/>
|
/>
|
||||||
<StyledInputDescription>
|
<StyledInputDescription>
|
||||||
What kind of feature toggle do you want?
|
What kind of feature flag do you want?
|
||||||
</StyledInputDescription>
|
</StyledInputDescription>
|
||||||
<FeatureTypeSelect
|
<FeatureTypeSelect
|
||||||
sx={styledSelectInput}
|
sx={styledSelectInput}
|
||||||
value={type}
|
value={type}
|
||||||
onChange={setType}
|
onChange={setType}
|
||||||
label={'Toggle type'}
|
label={'Flag type'}
|
||||||
id='feature-type-select'
|
id='feature-type-select'
|
||||||
editable
|
editable
|
||||||
data-testid={CF_TYPE_ID}
|
data-testid={CF_TYPE_ID}
|
||||||
@ -184,7 +184,7 @@ const FeatureForm: React.FC<IFeatureToggleForm> = ({
|
|||||||
condition={editable}
|
condition={editable}
|
||||||
show={
|
show={
|
||||||
<StyledInputDescription>
|
<StyledInputDescription>
|
||||||
In which project do you want to save the toggle?
|
In which project do you want to save the flag?
|
||||||
</StyledInputDescription>
|
</StyledInputDescription>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@ -206,7 +206,7 @@ const FeatureForm: React.FC<IFeatureToggleForm> = ({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<StyledInputDescription>
|
<StyledInputDescription>
|
||||||
How would you describe your feature toggle?
|
How would you describe your feature flag?
|
||||||
</StyledInputDescription>
|
</StyledInputDescription>
|
||||||
<StyledInput
|
<StyledInput
|
||||||
multiline
|
multiline
|
||||||
|
@ -92,7 +92,7 @@ export const FeatureStrategyConstraintAccordionList = forwardRef<
|
|||||||
<Typography variant='body2'>
|
<Typography variant='body2'>
|
||||||
Constraints are advanced
|
Constraints are advanced
|
||||||
targeting rules that you can use
|
targeting rules that you can use
|
||||||
to enable a feature toggle for a
|
to enable a feature flag for a
|
||||||
subset of your users. Read more
|
subset of your users. Read more
|
||||||
about constraints{' '}
|
about constraints{' '}
|
||||||
<a
|
<a
|
||||||
|
@ -21,9 +21,7 @@ export const FeatureStrategyEnabled: FC<IFeatureStrategyEnabledProps> = ({
|
|||||||
const featurePagePath = formatFeaturePath(projectId, featureId);
|
const featurePagePath = formatFeaturePath(projectId, featureId);
|
||||||
const { feature } = useFeature(projectId, featureId);
|
const { feature } = useFeature(projectId, featureId);
|
||||||
|
|
||||||
const featurePageLink = (
|
const featurePageLink = <Link to={featurePagePath}>feature flag page</Link>;
|
||||||
<Link to={featurePagePath}>feature toggle page</Link>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
@ -31,9 +29,9 @@ export const FeatureStrategyEnabled: FC<IFeatureStrategyEnabledProps> = ({
|
|||||||
show={children}
|
show={children}
|
||||||
elseShow={
|
elseShow={
|
||||||
<Alert severity='warning'>
|
<Alert severity='warning'>
|
||||||
This feature toggle is currently disabled in the{' '}
|
This feature flag is currently disabled in the{' '}
|
||||||
<strong>{environmentId}</strong> environment. Any changes
|
<strong>{environmentId}</strong> environment. Any changes
|
||||||
made here will not take effect until the toggle has been
|
made here will not take effect until the flag has been
|
||||||
enabled on the {featurePageLink}.
|
enabled on the {featurePageLink}.
|
||||||
</Alert>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
@ -398,7 +398,7 @@ export const FeatureStrategyForm = ({
|
|||||||
condition={Boolean(isChangeRequest)}
|
condition={Boolean(isChangeRequest)}
|
||||||
show={
|
show={
|
||||||
<Alert severity='success'>
|
<Alert severity='success'>
|
||||||
This feature toggle is currently enabled in the{' '}
|
This feature flag is currently enabled in the{' '}
|
||||||
<strong>{environmentId}</strong> environment.
|
<strong>{environmentId}</strong> environment.
|
||||||
Any changes made here will be available to users
|
Any changes made here will be available to users
|
||||||
as soon as these changes are approved and
|
as soon as these changes are approved and
|
||||||
@ -407,7 +407,7 @@ export const FeatureStrategyForm = ({
|
|||||||
}
|
}
|
||||||
elseShow={
|
elseShow={
|
||||||
<Alert severity='success'>
|
<Alert severity='success'>
|
||||||
This feature toggle is currently enabled in the{' '}
|
This feature flag is currently enabled in the{' '}
|
||||||
<strong>{environmentId}</strong> environment.
|
<strong>{environmentId}</strong> environment.
|
||||||
Any changes made here will be available to users
|
Any changes made here will be available to users
|
||||||
as soon as you hit <strong>save</strong>.
|
as soon as you hit <strong>save</strong>.
|
||||||
|
@ -21,8 +21,8 @@ export const FeatureMetricsContent = ({
|
|||||||
return (
|
return (
|
||||||
<Box mt={6}>
|
<Box mt={6}>
|
||||||
<Typography variant='body1' paragraph>
|
<Typography variant='body1' paragraph>
|
||||||
We have yet to receive any metrics for this feature toggle
|
We have yet to receive any metrics for this feature flag in
|
||||||
in the selected time period.
|
the selected time period.
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant='body1' paragraph>
|
<Typography variant='body1' paragraph>
|
||||||
Please note that, since the SDKs send metrics on an
|
Please note that, since the SDKs send metrics on an
|
||||||
|
@ -72,12 +72,12 @@ export const MarkCompletedDialogue = ({
|
|||||||
mb: 4,
|
mb: 4,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Marking the feature toggle as complete does not affect any
|
Marking the feature flag as complete does not affect any
|
||||||
configuration, but it moves the feature toggle into it’s
|
configuration, but it moves the feature flag into it’s next
|
||||||
next life cycle stage and is an indication that you have
|
life cycle stage and is an indication that you have learned
|
||||||
learned what you needed in order to progress with the
|
what you needed in order to progress with the feature. It
|
||||||
feature. It serves as a reminder to start cleaning up the
|
serves as a reminder to start cleaning up the feature flag
|
||||||
feature toggle and removing it from the code.
|
and removing it from the code.
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Typography
|
<Typography
|
||||||
|
@ -15,7 +15,7 @@ export const EnvironmentFooter = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<SectionSeparator>Feature toggle exposure</SectionSeparator>
|
<SectionSeparator>Feature flag exposure</SectionSeparator>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<FeatureMetricsStats
|
<FeatureMetricsStats
|
||||||
|
@ -79,7 +79,7 @@ export const FeatureOverviewSidePanel = ({
|
|||||||
<FeatureOverviewSidePanelTags
|
<FeatureOverviewSidePanelTags
|
||||||
header={
|
header={
|
||||||
<StyledHeader data-loading>
|
<StyledHeader data-loading>
|
||||||
Tags for this feature toggle
|
Tags for this feature flag
|
||||||
</StyledHeader>
|
</StyledHeader>
|
||||||
}
|
}
|
||||||
feature={feature}
|
feature={feature}
|
||||||
|
@ -80,12 +80,12 @@ const FeatureSettingsProjectConfirm = ({
|
|||||||
>
|
>
|
||||||
<StyledContainer>
|
<StyledContainer>
|
||||||
<StyledAlert severity='success'>
|
<StyledAlert severity='success'>
|
||||||
This feature toggle is compatible with the new
|
This feature flag is compatible with the new
|
||||||
project.
|
project.
|
||||||
</StyledAlert>
|
</StyledAlert>
|
||||||
<p>
|
<p>
|
||||||
Are you sure you want to change the project for this
|
Are you sure you want to change the project for this
|
||||||
toggle?
|
flag?
|
||||||
</p>
|
</p>
|
||||||
</StyledContainer>
|
</StyledContainer>
|
||||||
</Dialogue>
|
</Dialogue>
|
||||||
@ -107,7 +107,7 @@ const FeatureSettingsProjectConfirm = ({
|
|||||||
show={
|
show={
|
||||||
<p>
|
<p>
|
||||||
<span>
|
<span>
|
||||||
The feature toggle must not have any
|
The feature flag must not have any
|
||||||
dependencies.
|
dependencies.
|
||||||
</span>{' '}
|
</span>{' '}
|
||||||
<br />
|
<br />
|
||||||
@ -122,9 +122,9 @@ const FeatureSettingsProjectConfirm = ({
|
|||||||
condition={!hasSameEnvironments}
|
condition={!hasSameEnvironments}
|
||||||
show={
|
show={
|
||||||
<p>
|
<p>
|
||||||
In order to move a feature toggle between
|
In order to move a feature flag between two
|
||||||
two projects, both projects must have the
|
projects, both projects must have the exact
|
||||||
exact same environments enabled.
|
same environments enabled.
|
||||||
</p>
|
</p>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@ -133,9 +133,9 @@ const FeatureSettingsProjectConfirm = ({
|
|||||||
show={
|
show={
|
||||||
<>
|
<>
|
||||||
<p>
|
<p>
|
||||||
The feature toggle must not have any
|
The feature flag must not have any
|
||||||
pending change requests. This feature
|
pending change requests. This feature
|
||||||
toggle is currently referenced in the
|
flag is currently referenced in the
|
||||||
following change requests:
|
following change requests:
|
||||||
</p>
|
</p>
|
||||||
<StyledList>
|
<StyledList>
|
||||||
|
@ -135,7 +135,7 @@ const RolloutSlider = ({
|
|||||||
<Typography variant='body2'>
|
<Typography variant='body2'>
|
||||||
The groupId is used as a seed for the hash
|
The groupId is used as a seed for the hash
|
||||||
function, ensuring consistent feature exposure
|
function, ensuring consistent feature exposure
|
||||||
across different feature toggles for a uniform
|
across different feature flags for a uniform
|
||||||
user experience.
|
user experience.
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -159,7 +159,7 @@ export const EdgeIntegration = () => {
|
|||||||
and the one you should default to in most cases. It
|
and the one you should default to in most cases. It
|
||||||
connects to an upstream node, such as your Unleash
|
connects to an upstream node, such as your Unleash
|
||||||
instance, and uses that as the source of truth for
|
instance, and uses that as the source of truth for
|
||||||
feature toggles.
|
feature flags.
|
||||||
</Typography>
|
</Typography>
|
||||||
<StyledFigure>
|
<StyledFigure>
|
||||||
<img src={formatAssetPath(edgeMode)} alt='test' />
|
<img src={formatAssetPath(edgeMode)} alt='test' />
|
||||||
|
@ -30,7 +30,7 @@ export const PlaygroundResultFeatureStrategyList = ({
|
|||||||
condition={feature?.strategies?.data?.length === 0}
|
condition={feature?.strategies?.data?.length === 0}
|
||||||
show={
|
show={
|
||||||
<Alert severity='warning' sx={{ mt: 2 }}>
|
<Alert severity='warning' sx={{ mt: 2 }}>
|
||||||
There are no strategies added to this feature toggle in
|
There are no strategies added to this feature flag in
|
||||||
selected environment.
|
selected environment.
|
||||||
</Alert>
|
</Alert>
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ export const ImportTimeline: FC<{
|
|||||||
Import file
|
Import file
|
||||||
</TimelineItemTitle>
|
</TimelineItemTitle>
|
||||||
<TimelineItemDescription>
|
<TimelineItemDescription>
|
||||||
Import previously exported toggle configuration from
|
Import previously exported flag configuration from
|
||||||
another Unleash instance as a JSON file
|
another Unleash instance as a JSON file
|
||||||
</TimelineItemDescription>
|
</TimelineItemDescription>
|
||||||
</StyledTimelineContent>
|
</StyledTimelineContent>
|
||||||
@ -126,8 +126,8 @@ export const ImportTimeline: FC<{
|
|||||||
Finish import
|
Finish import
|
||||||
</TimelineItemTitle>
|
</TimelineItemTitle>
|
||||||
<TimelineItemDescription>
|
<TimelineItemDescription>
|
||||||
Feature toggle configuration will be imported to your
|
Feature flag configuration will be imported to your new
|
||||||
new Unleash instance
|
Unleash instance
|
||||||
</TimelineItemDescription>
|
</TimelineItemDescription>
|
||||||
</StyledTimelineContent>
|
</StyledTimelineContent>
|
||||||
</TimelineItem>
|
</TimelineItem>
|
||||||
|
@ -23,18 +23,18 @@ export const ImportExplanation: FC = () => (
|
|||||||
What is being imported?
|
What is being imported?
|
||||||
</ImportExplanationHeader>
|
</ImportExplanationHeader>
|
||||||
<ImportExplanationDescription>
|
<ImportExplanationDescription>
|
||||||
Feature toggles will be imported with full configuration:
|
Feature flags will be imported with full configuration:
|
||||||
<ul>
|
<ul>
|
||||||
<li>strategies</li>
|
<li>strategies</li>
|
||||||
<li>context fields</li>
|
<li>context fields</li>
|
||||||
<li>variants</li>
|
<li>variants</li>
|
||||||
<li>tags</li>
|
<li>tags</li>
|
||||||
<li>feature toggle status</li>
|
<li>feature flag status</li>
|
||||||
</ul>
|
</ul>
|
||||||
</ImportExplanationDescription>
|
</ImportExplanationDescription>
|
||||||
<ImportExplanationHeader>Exceptions?</ImportExplanationHeader>
|
<ImportExplanationHeader>Exceptions?</ImportExplanationHeader>
|
||||||
<ImportExplanationDescription>
|
<ImportExplanationDescription>
|
||||||
If the feature toggle already exists in the new instance, it will be
|
If the feature flag already exists in the new instance, it will be
|
||||||
overwritten
|
overwritten
|
||||||
</ImportExplanationDescription>
|
</ImportExplanationDescription>
|
||||||
<ImportExplanationHeader>What is not imported?</ImportExplanationHeader>
|
<ImportExplanationHeader>What is not imported?</ImportExplanationHeader>
|
||||||
|
@ -15,7 +15,7 @@ export const TableEmptyState: FC<ITablePlaceholderProps> = ({ query }) => {
|
|||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<TablePlaceholder>
|
<TablePlaceholder>
|
||||||
No feature toggles found matching “
|
No feature flags found matching “
|
||||||
{query}
|
{query}
|
||||||
”
|
”
|
||||||
</TablePlaceholder>
|
</TablePlaceholder>
|
||||||
@ -29,7 +29,7 @@ export const TableEmptyState: FC<ITablePlaceholderProps> = ({ query }) => {
|
|||||||
padding: theme.spacing(3),
|
padding: theme.spacing(3),
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<TablePlaceholder>No feature toggles available.</TablePlaceholder>
|
<TablePlaceholder>No feature flags available.</TablePlaceholder>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,7 @@ export const CollaborationModeTooltip: FC = () => {
|
|||||||
<StyledTitle>private: </StyledTitle>
|
<StyledTitle>private: </StyledTitle>
|
||||||
<StyledDescription>
|
<StyledDescription>
|
||||||
Only admins, editors and project members can see and
|
Only admins, editors and project members can see and
|
||||||
access the project and associated feature toggles
|
access the project and associated feature flags
|
||||||
</StyledDescription>
|
</StyledDescription>
|
||||||
</Box>
|
</Box>
|
||||||
</>
|
</>
|
||||||
|
@ -7,9 +7,9 @@ export const FeatureTogglesLimitTooltip: FC = () => (
|
|||||||
htmlTooltip
|
htmlTooltip
|
||||||
tooltip={
|
tooltip={
|
||||||
<Box>
|
<Box>
|
||||||
Enforce an upper limit of the number of feature toggles that may
|
Enforce an upper limit of the number of feature flags that may
|
||||||
be created for this project. You can create unlimited feature
|
be created for this project. You can create unlimited feature
|
||||||
toggle if there is no limit set.
|
flag if there is no limit set.
|
||||||
</Box>
|
</Box>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -83,14 +83,14 @@ export const ReportCard = ({ healthReport }: IReportCardProps) => {
|
|||||||
const renderActiveToggles = () => (
|
const renderActiveToggles = () => (
|
||||||
<StyledBoxActive>
|
<StyledBoxActive>
|
||||||
<CheckIcon />
|
<CheckIcon />
|
||||||
<span>{healthReport.activeCount} active toggles</span>
|
<span>{healthReport.activeCount} active flags</span>
|
||||||
</StyledBoxActive>
|
</StyledBoxActive>
|
||||||
);
|
);
|
||||||
|
|
||||||
const renderStaleToggles = () => (
|
const renderStaleToggles = () => (
|
||||||
<StyledBoxStale>
|
<StyledBoxStale>
|
||||||
<ReportProblemOutlinedIcon />
|
<ReportProblemOutlinedIcon />
|
||||||
<span>{healthReport.staleCount} stale toggles</span>
|
<span>{healthReport.staleCount} stale flags</span>
|
||||||
</StyledBoxStale>
|
</StyledBoxStale>
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ export const ReportCard = ({ healthReport }: IReportCardProps) => {
|
|||||||
<StyledBoxStale>
|
<StyledBoxStale>
|
||||||
<ReportProblemOutlinedIcon />
|
<ReportProblemOutlinedIcon />
|
||||||
<span>
|
<span>
|
||||||
{healthReport.potentiallyStaleCount} potentially stale toggles
|
{healthReport.potentiallyStaleCount} potentially stale flags
|
||||||
</span>
|
</span>
|
||||||
</StyledBoxStale>
|
</StyledBoxStale>
|
||||||
);
|
);
|
||||||
@ -107,8 +107,8 @@ export const ReportCard = ({ healthReport }: IReportCardProps) => {
|
|||||||
<HtmlTooltip
|
<HtmlTooltip
|
||||||
title={
|
title={
|
||||||
<>
|
<>
|
||||||
If your toggle exceeds the expected lifetime of its toggle
|
If your flag exceeds the expected lifetime of its flag type
|
||||||
type it will be marked as potentially stale.
|
it will be marked as potentially stale.
|
||||||
<Box sx={{ mt: 2 }}>
|
<Box sx={{ mt: 2 }}>
|
||||||
<a
|
<a
|
||||||
href='https://docs.getunleash.io/reference/technical-debt#stale-and-potentially-stale-toggles'
|
href='https://docs.getunleash.io/reference/technical-debt#stale-and-potentially-stale-toggles'
|
||||||
@ -152,7 +152,7 @@ export const ReportCard = ({ healthReport }: IReportCardProps) => {
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<StyledHeader>Toggle report</StyledHeader>
|
<StyledHeader>Flag report</StyledHeader>
|
||||||
<StyledList>
|
<StyledList>
|
||||||
<li>
|
<li>
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
@ -164,7 +164,7 @@ export const ReportCard = ({ healthReport }: IReportCardProps) => {
|
|||||||
condition={Boolean(healthReport.activeCount)}
|
condition={Boolean(healthReport.activeCount)}
|
||||||
show={
|
show={
|
||||||
<StyledAlignedItem>
|
<StyledAlignedItem>
|
||||||
Also includes potentially stale toggles.
|
Also includes potentially stale flags.
|
||||||
</StyledAlignedItem>
|
</StyledAlignedItem>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@ -199,8 +199,8 @@ export const ReportCard = ({ healthReport }: IReportCardProps) => {
|
|||||||
show={
|
show={
|
||||||
<>
|
<>
|
||||||
<StyledAlignedItem>
|
<StyledAlignedItem>
|
||||||
Review your feature toggles and delete unused
|
Review your feature flags and delete unused
|
||||||
toggles.
|
flags.
|
||||||
</StyledAlignedItem>
|
</StyledAlignedItem>
|
||||||
<Box sx={{ mt: 2 }}>
|
<Box sx={{ mt: 2 }}>
|
||||||
<Link
|
<Link
|
||||||
|
@ -226,7 +226,7 @@ export const ReportTable = ({ projectId, features }: IReportTableProps) => {
|
|||||||
elseShow={
|
elseShow={
|
||||||
<TablePlaceholder>
|
<TablePlaceholder>
|
||||||
No feature flags available. Get started by
|
No feature flags available. Get started by
|
||||||
adding a new feature toggle.
|
adding a new feature flag.
|
||||||
</TablePlaceholder>
|
</TablePlaceholder>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -89,10 +89,10 @@ export const ProjectInsightsStats = ({ stats }: IProjectStatsProps) => {
|
|||||||
percentage
|
percentage
|
||||||
>
|
>
|
||||||
<HelpPopper id='avg-time-to-prod'>
|
<HelpPopper id='avg-time-to-prod'>
|
||||||
How long did it take on average from a feature toggle was
|
How long did it take on average from a feature flag was
|
||||||
created until it was enabled in an environment of type
|
created until it was enabled in an environment of type
|
||||||
production. This is calculated only from feature toggles
|
production. This is calculated only from feature flags with
|
||||||
with the type of "release".
|
the type of "release".
|
||||||
</HelpPopper>
|
</HelpPopper>
|
||||||
</StatusBox>
|
</StatusBox>
|
||||||
<StatusBox
|
<StatusBox
|
||||||
|
@ -41,9 +41,9 @@ export const DeleteProject = ({
|
|||||||
<StyledContainer>
|
<StyledContainer>
|
||||||
<p>
|
<p>
|
||||||
Before you can delete a project, you must first archive all the
|
Before you can delete a project, you must first archive all the
|
||||||
feature toggles associated with it. Keep in mind that deleting a
|
feature flags associated with it. Keep in mind that deleting a
|
||||||
project will permanently remove all the archived feature
|
project will permanently remove all the archived feature flags,
|
||||||
toggles, and they cannot be recovered once deleted.
|
and they cannot be recovered once deleted.
|
||||||
</p>
|
</p>
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={isEnterprise() && automatedActionsEnabled}
|
condition={isEnterprise() && automatedActionsEnabled}
|
||||||
@ -57,7 +57,7 @@ export const DeleteProject = ({
|
|||||||
/>
|
/>
|
||||||
<p>
|
<p>
|
||||||
Currently there are{' '}
|
Currently there are{' '}
|
||||||
<strong>{featureCount} feature toggles active</strong>
|
<strong>{featureCount} feature flags active</strong>
|
||||||
</p>
|
</p>
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={isEnterprise() && automatedActionsEnabled}
|
condition={isEnterprise() && automatedActionsEnabled}
|
||||||
|
@ -95,10 +95,10 @@ export const ProjectStats = ({ stats }: IProjectStatsProps) => {
|
|||||||
percentage
|
percentage
|
||||||
>
|
>
|
||||||
<HelpPopper id='avg-time-to-prod'>
|
<HelpPopper id='avg-time-to-prod'>
|
||||||
How long did it take on average from a feature toggle
|
How long did it take on average from a feature flag was
|
||||||
was created until it was enabled in an environment of
|
created until it was enabled in an environment of type
|
||||||
type production. This is calculated only from feature
|
production. This is calculated only from feature flags
|
||||||
toggles with the type of "release".
|
with the type of "release".
|
||||||
</HelpPopper>
|
</HelpPopper>
|
||||||
</StatusBox>
|
</StatusBox>
|
||||||
</StyledWidget>
|
</StyledWidget>
|
||||||
|
@ -58,7 +58,7 @@ export const SegmentDeleteUsedSegment = ({
|
|||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
The following feature toggles are using the{' '}
|
The following feature flags are using the{' '}
|
||||||
<strong>{segment.name}</strong> segment for their strategies:
|
<strong>{segment.name}</strong> segment for their strategies:
|
||||||
</p>
|
</p>
|
||||||
<StyledUl>
|
<StyledUl>
|
||||||
|
@ -242,7 +242,7 @@ const theme = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For 'Seen' column on feature toggles list and other
|
* For 'Seen' column on feature flags list and other
|
||||||
*/
|
*/
|
||||||
seen: {
|
seen: {
|
||||||
unknown: '#2B2A3C',
|
unknown: '#2B2A3C',
|
||||||
|
@ -227,7 +227,7 @@ export const theme = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For 'Seen' column on feature toggles list and other
|
* For 'Seen' column on feature flags list and other
|
||||||
*/
|
*/
|
||||||
seen: {
|
seen: {
|
||||||
unknown: colors.grey[100],
|
unknown: colors.grey[100],
|
||||||
|
@ -69,7 +69,7 @@ declare module '@mui/material/styles' {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For 'Seen' column on feature toggles list and other
|
* For 'Seen' column on feature flags list and other
|
||||||
*/
|
*/
|
||||||
seen: {
|
seen: {
|
||||||
unknown: string;
|
unknown: string;
|
||||||
|
@ -173,7 +173,7 @@ class FeatureTagStore implements IFeatureTagStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Only gets tags for active feature toggles.
|
* Only gets tags for active feature flags.
|
||||||
*/
|
*/
|
||||||
async getAllFeatureTags(): Promise<IFeatureTag[]> {
|
async getAllFeatureTags(): Promise<IFeatureTag[]> {
|
||||||
const rows = await this.db(TABLE)
|
const rows = await this.db(TABLE)
|
||||||
|
@ -1102,10 +1102,10 @@ class FeatureToggleService {
|
|||||||
/**
|
/**
|
||||||
* @deprecated Legacy!
|
* @deprecated Legacy!
|
||||||
*
|
*
|
||||||
* Used to retrieve metadata of all feature toggles defined in Unleash.
|
* Used to retrieve metadata of all feature flags defined in Unleash.
|
||||||
* @param query - Allow you to limit search based on criteria such as project, tags, namePrefix. See @IFeatureToggleQuery
|
* @param query - Allow you to limit search based on criteria such as project, tags, namePrefix. See @IFeatureToggleQuery
|
||||||
* @param userId - Used to find / mark features as favorite based on users preferences
|
* @param userId - Used to find / mark features as favorite based on users preferences
|
||||||
* @param archived - Return archived or active toggles
|
* @param archived - Return archived or active flags
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
async getFeatureToggles(
|
async getFeatureToggles(
|
||||||
|
@ -78,7 +78,7 @@ const rbacMiddleware = (
|
|||||||
findParam('environment', req) ||
|
findParam('environment', req) ||
|
||||||
findParam('environmentId', req);
|
findParam('environmentId', req);
|
||||||
|
|
||||||
// Temporary workaround to figure out projectId for feature toggle updates.
|
// Temporary workaround to figure out projectId for feature flag updates.
|
||||||
// will be removed in Unleash v5.0
|
// will be removed in Unleash v5.0
|
||||||
if (
|
if (
|
||||||
!projectId &&
|
!projectId &&
|
||||||
|
@ -107,7 +107,7 @@ test('should trigger simple-addon eventHandler', async () => {
|
|||||||
|
|
||||||
await addonService.createAddon(config, TEST_AUDIT_USER);
|
await addonService.createAddon(config, TEST_AUDIT_USER);
|
||||||
|
|
||||||
// Feature toggle was created
|
// Feature flag was created
|
||||||
await eventService.storeEvent({
|
await eventService.storeEvent({
|
||||||
type: FEATURE_CREATED,
|
type: FEATURE_CREATED,
|
||||||
createdBy: SYSTEM_USER.username!,
|
createdBy: SYSTEM_USER.username!,
|
||||||
|
Loading…
Reference in New Issue
Block a user