mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-27 13:49:10 +02:00
feat: remove project overview flags (#3532)
This commit is contained in:
parent
f92a154cd1
commit
5fa13aba0e
@ -195,43 +195,6 @@ export const Project = () => {
|
|||||||
/>
|
/>
|
||||||
</StyledDiv>
|
</StyledDiv>
|
||||||
</StyledTopRow>
|
</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:
|
|
||||||
</StyledTitle>
|
|
||||||
<StyledText data-loading>
|
|
||||||
{project.description}
|
|
||||||
</StyledText>
|
|
||||||
</StyledDiv>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<StyledDiv>
|
|
||||||
<StyledTitle data-loading>
|
|
||||||
projectId:
|
|
||||||
</StyledTitle>
|
|
||||||
<StyledText data-loading>
|
|
||||||
{projectId}
|
|
||||||
</StyledText>
|
|
||||||
</StyledDiv>
|
|
||||||
</div>
|
|
||||||
</StyledProjectTitle>
|
|
||||||
</StyledColumn>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</StyledInnerContainer>
|
</StyledInnerContainer>
|
||||||
|
|
||||||
<StyledSeparator />
|
<StyledSeparator />
|
||||||
|
@ -60,33 +60,6 @@ const ProjectInfo = ({
|
|||||||
(!showChangeRequestsWidget && !showProjectMembersWidget) ||
|
(!showChangeRequestsWidget && !showProjectMembersWidget) ||
|
||||||
(isSmallScreen && 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 (
|
return (
|
||||||
<aside>
|
<aside>
|
||||||
<StyledProjectInfoSidebarContainer
|
<StyledProjectInfoSidebarContainer
|
||||||
|
@ -60,10 +60,7 @@ const ProjectOverview = () => {
|
|||||||
stats={stats}
|
stats={stats}
|
||||||
/>
|
/>
|
||||||
<StyledContentContainer>
|
<StyledContentContainer>
|
||||||
<ConditionallyRender
|
<ProjectStats stats={project.stats} />
|
||||||
condition={Boolean(uiConfig?.flags.newProjectOverview)}
|
|
||||||
show={<ProjectStats stats={project.stats} />}
|
|
||||||
/>
|
|
||||||
<StyledProjectToggles>
|
<StyledProjectToggles>
|
||||||
<ProjectFeatureToggles
|
<ProjectFeatureToggles
|
||||||
features={features}
|
features={features}
|
||||||
|
@ -86,10 +86,8 @@ exports[`should create default config 1`] = `
|
|||||||
"optimal304Differ": false,
|
"optimal304Differ": false,
|
||||||
"personalAccessTokensKillSwitch": false,
|
"personalAccessTokensKillSwitch": false,
|
||||||
"proPlanAutoCharge": false,
|
"proPlanAutoCharge": false,
|
||||||
"projectMode": false,
|
|
||||||
"projectScopedSegments": false,
|
"projectScopedSegments": false,
|
||||||
"projectScopedStickiness": false,
|
"projectScopedStickiness": false,
|
||||||
"projectStatusApi": false,
|
|
||||||
"responseTimeWithAppNameKillSwitch": false,
|
"responseTimeWithAppNameKillSwitch": false,
|
||||||
"strictSchemaValidation": false,
|
"strictSchemaValidation": false,
|
||||||
},
|
},
|
||||||
@ -115,10 +113,8 @@ exports[`should create default config 1`] = `
|
|||||||
"optimal304Differ": false,
|
"optimal304Differ": false,
|
||||||
"personalAccessTokensKillSwitch": false,
|
"personalAccessTokensKillSwitch": false,
|
||||||
"proPlanAutoCharge": false,
|
"proPlanAutoCharge": false,
|
||||||
"projectMode": false,
|
|
||||||
"projectScopedSegments": false,
|
"projectScopedSegments": false,
|
||||||
"projectScopedStickiness": false,
|
"projectScopedStickiness": false,
|
||||||
"projectStatusApi": false,
|
|
||||||
"responseTimeWithAppNameKillSwitch": false,
|
"responseTimeWithAppNameKillSwitch": false,
|
||||||
"strictSchemaValidation": false,
|
"strictSchemaValidation": false,
|
||||||
},
|
},
|
||||||
|
@ -666,24 +666,20 @@ export default class ProjectService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async statusJob(): Promise<void> {
|
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(
|
const statusUpdates = await Promise.all(
|
||||||
projects.map((project) => this.getStatusUpdates(project.id)),
|
projects.map((project) => this.getStatusUpdates(project.id)),
|
||||||
);
|
);
|
||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
statusUpdates.map((statusUpdate) => {
|
statusUpdates.map((statusUpdate) => {
|
||||||
return this.projectStatsStore.updateProjectStats(
|
return this.projectStatsStore.updateProjectStats(
|
||||||
statusUpdate.projectId,
|
statusUpdate.projectId,
|
||||||
statusUpdate.updates,
|
statusUpdate.updates,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
this.logger.info('Project status API is disabled');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getStatusUpdates(projectId: string): Promise<ICalculateStatus> {
|
async getStatusUpdates(projectId: string): Promise<ICalculateStatus> {
|
||||||
|
@ -10,10 +10,6 @@ const flags = {
|
|||||||
process.env.UNLEASH_EXPERIMENTAL_EMBED_PROXY,
|
process.env.UNLEASH_EXPERIMENTAL_EMBED_PROXY,
|
||||||
true,
|
true,
|
||||||
),
|
),
|
||||||
projectStatusApi: parseEnvVarBoolean(
|
|
||||||
process.env.UNLEASH_EXPERIMENTAL_PROJECT_STATUS_API,
|
|
||||||
false,
|
|
||||||
),
|
|
||||||
newProjectOverview: parseEnvVarBoolean(
|
newProjectOverview: parseEnvVarBoolean(
|
||||||
process.env.NEW_PROJECT_OVERVIEW,
|
process.env.NEW_PROJECT_OVERVIEW,
|
||||||
false,
|
false,
|
||||||
@ -67,7 +63,6 @@ const flags = {
|
|||||||
process.env.PROJECT_SCOPED_STICKINESS,
|
process.env.PROJECT_SCOPED_STICKINESS,
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
projectMode: parseEnvVarBoolean(process.env.PROJECT_MODE, false),
|
|
||||||
personalAccessTokensKillSwitch: parseEnvVarBoolean(
|
personalAccessTokensKillSwitch: parseEnvVarBoolean(
|
||||||
process.env.UNLEASH_PAT_KILL_SWITCH,
|
process.env.UNLEASH_PAT_KILL_SWITCH,
|
||||||
false,
|
false,
|
||||||
|
@ -40,7 +40,6 @@ process.nextTick(async () => {
|
|||||||
responseTimeWithAppNameKillSwitch: false,
|
responseTimeWithAppNameKillSwitch: false,
|
||||||
newProjectOverview: true,
|
newProjectOverview: true,
|
||||||
bulkOperations: true,
|
bulkOperations: true,
|
||||||
projectStatusApi: true,
|
|
||||||
projectScopedSegments: true,
|
projectScopedSegments: true,
|
||||||
projectScopedStickiness: true,
|
projectScopedStickiness: true,
|
||||||
optimal304: true,
|
optimal304: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user