mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-12 01:17:04 +02:00
feat: completed stage lists all environments (#7007)
This commit is contained in:
parent
95ac2e6b8d
commit
f6e85171d9
@ -315,8 +315,8 @@ const SafeToArchive: FC<{
|
|||||||
mb: 1,
|
mb: 1,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
We haven’t seen this feature flag in production for at least two
|
We haven’t seen this feature flag in any environment for at
|
||||||
days. It’s likely that it’s safe to archive this flag.
|
least two days. It’s likely that it’s safe to archive this flag.
|
||||||
</InfoText>
|
</InfoText>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
@ -362,8 +362,18 @@ const ActivelyUsed: FC<{
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
This feature has been successfully completed, but we are still
|
This feature has been successfully completed, but we are still
|
||||||
seeing usage in production. Clean up the feature flag from your code
|
seeing usage. Clean up the feature flag from your code before
|
||||||
before archiving it:
|
archiving it:
|
||||||
|
</InfoText>
|
||||||
|
{children}
|
||||||
|
<InfoText
|
||||||
|
sx={{
|
||||||
|
mt: 1,
|
||||||
|
mb: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
If you think this feature was completed too early you can revert to
|
||||||
|
the live stage:
|
||||||
</InfoText>
|
</InfoText>
|
||||||
<PermissionButton
|
<PermissionButton
|
||||||
color='inherit'
|
color='inherit'
|
||||||
@ -376,7 +386,6 @@ const ActivelyUsed: FC<{
|
|||||||
>
|
>
|
||||||
Revert to live
|
Revert to live
|
||||||
</PermissionButton>
|
</PermissionButton>
|
||||||
{children}
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -58,12 +58,16 @@ describe('populateCurrentStage', () => {
|
|||||||
lifecycle: { stage: 'completed', enteredStageAt },
|
lifecycle: { stage: 'completed', enteredStageAt },
|
||||||
environments: [
|
environments: [
|
||||||
{ name: 'prod', type: 'production', lastSeenAt: '2022-08-01' },
|
{ name: 'prod', type: 'production', lastSeenAt: '2022-08-01' },
|
||||||
|
{ name: 'dev', type: 'development', lastSeenAt: '2022-08-01' },
|
||||||
],
|
],
|
||||||
} as IFeatureToggle;
|
} as IFeatureToggle;
|
||||||
const expected = {
|
const expected = {
|
||||||
name: 'completed',
|
name: 'completed',
|
||||||
status: 'kept',
|
status: 'kept',
|
||||||
environments: [{ name: 'prod', lastSeenAt: '2022-08-01' }],
|
environments: [
|
||||||
|
{ name: 'prod', lastSeenAt: '2022-08-01' },
|
||||||
|
{ name: 'dev', lastSeenAt: '2022-08-01' },
|
||||||
|
],
|
||||||
enteredStageAt,
|
enteredStageAt,
|
||||||
};
|
};
|
||||||
const result = populateCurrentStage(feature);
|
const result = populateCurrentStage(feature);
|
||||||
|
@ -40,9 +40,7 @@ export const populateCurrentStage = (
|
|||||||
return {
|
return {
|
||||||
name: 'completed',
|
name: 'completed',
|
||||||
status: 'kept',
|
status: 'kept',
|
||||||
environments: getFilteredEnvironments(
|
environments: getFilteredEnvironments(() => true),
|
||||||
(type) => type === 'production',
|
|
||||||
),
|
|
||||||
enteredStageAt,
|
enteredStageAt,
|
||||||
};
|
};
|
||||||
case 'archived':
|
case 'archived':
|
||||||
|
Loading…
Reference in New Issue
Block a user