1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-04-19 01:17:18 +02:00

feat: remove project overview flags (#3532)

This commit is contained in:
Mateusz Kwasniewski 2023-04-17 11:21:52 +02:00 committed by GitHub
parent f92a154cd1
commit 5fa13aba0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 94 deletions

View File

@ -195,43 +195,6 @@ export const Project = () => {
/>
</StyledDiv>
</StyledTopRow>
<ConditionallyRender
condition={
!Boolean(uiConfig?.flags?.newProjectOverview)
}
// TODO: !!! Remove entire block when removing feature flag!
show={() => (
<StyledColumn>
<StyledProjectTitle>
<div>
<ConditionallyRender
condition={Boolean(
project.description
)}
show={
<StyledDiv>
<StyledTitle data-loading>
Description:&nbsp;
</StyledTitle>
<StyledText data-loading>
{project.description}
</StyledText>
</StyledDiv>
}
/>
<StyledDiv>
<StyledTitle data-loading>
projectId:&nbsp;
</StyledTitle>
<StyledText data-loading>
{projectId}
</StyledText>
</StyledDiv>
</div>
</StyledProjectTitle>
</StyledColumn>
)}
/>
</StyledInnerContainer>
<StyledSeparator />

View File

@ -60,33 +60,6 @@ const ProjectInfo = ({
(!showChangeRequestsWidget && !showProjectMembersWidget) ||
(isSmallScreen && showChangeRequestsWidget && showProjectMembersWidget);
if (!Boolean(uiConfig?.flags.newProjectOverview)) {
return (
<aside>
<Box
sx={{
display: 'grid',
gridTemplateColumns:
'repeat(auto-fit, minmax(225px, 1fr))',
gap: theme => theme.spacing(2),
paddingBottom: theme => theme.spacing(2),
}}
>
<LegacyHealthWidget projectId={id} health={health} />
<ConditionallyRender
condition={showProjectMembersWidget}
show={
<LegacyProjectMembersWidget
projectId={id}
memberCount={memberCount}
/>
}
/>
</Box>
</aside>
);
}
return (
<aside>
<StyledProjectInfoSidebarContainer

View File

@ -60,10 +60,7 @@ const ProjectOverview = () => {
stats={stats}
/>
<StyledContentContainer>
<ConditionallyRender
condition={Boolean(uiConfig?.flags.newProjectOverview)}
show={<ProjectStats stats={project.stats} />}
/>
<ProjectStats stats={project.stats} />
<StyledProjectToggles>
<ProjectFeatureToggles
features={features}

View File

@ -86,10 +86,8 @@ exports[`should create default config 1`] = `
"optimal304Differ": false,
"personalAccessTokensKillSwitch": false,
"proPlanAutoCharge": false,
"projectMode": false,
"projectScopedSegments": false,
"projectScopedStickiness": false,
"projectStatusApi": false,
"responseTimeWithAppNameKillSwitch": false,
"strictSchemaValidation": false,
},
@ -115,10 +113,8 @@ exports[`should create default config 1`] = `
"optimal304Differ": false,
"personalAccessTokensKillSwitch": false,
"proPlanAutoCharge": false,
"projectMode": false,
"projectScopedSegments": false,
"projectScopedStickiness": false,
"projectStatusApi": false,
"responseTimeWithAppNameKillSwitch": false,
"strictSchemaValidation": false,
},

View File

@ -666,24 +666,20 @@ export default class ProjectService {
}
async statusJob(): Promise<void> {
if (this.flagResolver.isEnabled('projectStatusApi')) {
const projects = await this.store.getAll();
const projects = await this.store.getAll();
const statusUpdates = await Promise.all(
projects.map((project) => this.getStatusUpdates(project.id)),
);
const statusUpdates = await Promise.all(
projects.map((project) => this.getStatusUpdates(project.id)),
);
await Promise.all(
statusUpdates.map((statusUpdate) => {
return this.projectStatsStore.updateProjectStats(
statusUpdate.projectId,
statusUpdate.updates,
);
}),
);
} else {
this.logger.info('Project status API is disabled');
}
await Promise.all(
statusUpdates.map((statusUpdate) => {
return this.projectStatsStore.updateProjectStats(
statusUpdate.projectId,
statusUpdate.updates,
);
}),
);
}
async getStatusUpdates(projectId: string): Promise<ICalculateStatus> {

View File

@ -10,10 +10,6 @@ const flags = {
process.env.UNLEASH_EXPERIMENTAL_EMBED_PROXY,
true,
),
projectStatusApi: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_PROJECT_STATUS_API,
false,
),
newProjectOverview: parseEnvVarBoolean(
process.env.NEW_PROJECT_OVERVIEW,
false,
@ -67,7 +63,6 @@ const flags = {
process.env.PROJECT_SCOPED_STICKINESS,
false,
),
projectMode: parseEnvVarBoolean(process.env.PROJECT_MODE, false),
personalAccessTokensKillSwitch: parseEnvVarBoolean(
process.env.UNLEASH_PAT_KILL_SWITCH,
false,

View File

@ -40,7 +40,6 @@ process.nextTick(async () => {
responseTimeWithAppNameKillSwitch: false,
newProjectOverview: true,
bulkOperations: true,
projectStatusApi: true,
projectScopedSegments: true,
projectScopedStickiness: true,
optimal304: true,