mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01: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,
|
||||
}}
|
||||
>
|
||||
We haven’t seen this feature flag in production for at least two
|
||||
days. It’s likely that it’s safe to archive this flag.
|
||||
We haven’t seen this feature flag in any environment for at
|
||||
least two days. It’s likely that it’s safe to archive this flag.
|
||||
</InfoText>
|
||||
<Box
|
||||
sx={{
|
||||
@ -362,8 +362,18 @@ const ActivelyUsed: FC<{
|
||||
}}
|
||||
>
|
||||
This feature has been successfully completed, but we are still
|
||||
seeing usage in production. Clean up the feature flag from your code
|
||||
before archiving it:
|
||||
seeing usage. Clean up the feature flag from your code before
|
||||
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>
|
||||
<PermissionButton
|
||||
color='inherit'
|
||||
@ -376,7 +386,6 @@ const ActivelyUsed: FC<{
|
||||
>
|
||||
Revert to live
|
||||
</PermissionButton>
|
||||
{children}
|
||||
</>
|
||||
);
|
||||
|
||||
|
@ -58,12 +58,16 @@ describe('populateCurrentStage', () => {
|
||||
lifecycle: { stage: 'completed', enteredStageAt },
|
||||
environments: [
|
||||
{ name: 'prod', type: 'production', lastSeenAt: '2022-08-01' },
|
||||
{ name: 'dev', type: 'development', lastSeenAt: '2022-08-01' },
|
||||
],
|
||||
} as IFeatureToggle;
|
||||
const expected = {
|
||||
name: 'completed',
|
||||
status: 'kept',
|
||||
environments: [{ name: 'prod', lastSeenAt: '2022-08-01' }],
|
||||
environments: [
|
||||
{ name: 'prod', lastSeenAt: '2022-08-01' },
|
||||
{ name: 'dev', lastSeenAt: '2022-08-01' },
|
||||
],
|
||||
enteredStageAt,
|
||||
};
|
||||
const result = populateCurrentStage(feature);
|
||||
|
@ -40,9 +40,7 @@ export const populateCurrentStage = (
|
||||
return {
|
||||
name: 'completed',
|
||||
status: 'kept',
|
||||
environments: getFilteredEnvironments(
|
||||
(type) => type === 'production',
|
||||
),
|
||||
environments: getFilteredEnvironments(() => true),
|
||||
enteredStageAt,
|
||||
};
|
||||
case 'archived':
|
||||
|
Loading…
Reference in New Issue
Block a user