1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-01 13:47:27 +02:00

Remove entire row for median time to production (#10034)

Removes the "median time to production" snapshot + graph when the
lifecycleMetrics flag is active.

In other words: this entire box is gone 💨 
<img width="1326" alt="image"
src="https://github.com/user-attachments/assets/929a9097-82a6-493d-b0dd-614000ffcfe7"
/>
This commit is contained in:
Thomas Heartman 2025-05-27 13:00:08 +01:00 committed by GitHub
parent 092c525531
commit 5df074bd14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,6 +18,7 @@ import { allOption } from 'component/common/ProjectSelect/ProjectSelect';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { WidgetTitle } from './components/WidgetTitle/WidgetTitle.tsx'; import { WidgetTitle } from './components/WidgetTitle/WidgetTitle.tsx';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import { useUiFlag } from 'hooks/useUiFlag.ts';
export interface IChartsProps { export interface IChartsProps {
flagTrends: InstanceInsightsSchema['flagTrends']; flagTrends: InstanceInsightsSchema['flagTrends'];
@ -104,6 +105,7 @@ export const InsightsCharts: FC<IChartsProps> = ({
const showAllProjects = projects[0] === allOption.id; const showAllProjects = projects[0] === allOption.id;
const isOneProjectSelected = projects.length === 1; const isOneProjectSelected = projects.length === 1;
const { isEnterprise } = useUiConfig(); const { isEnterprise } = useUiConfig();
const showMedianTimeToProduction = !useUiFlag('lifecycleMetrics');
const lastUserTrend = userTrends[userTrends.length - 1]; const lastUserTrend = userTrends[userTrends.length - 1];
const lastFlagTrend = flagTrends[flagTrends.length - 1]; const lastFlagTrend = flagTrends[flagTrends.length - 1];
@ -205,26 +207,28 @@ export const InsightsCharts: FC<IChartsProps> = ({
/> />
</StyledChartContainer> </StyledChartContainer>
</StyledWidget> </StyledWidget>
<StyledWidget> {showMedianTimeToProduction ? (
<StyledWidgetStats> <StyledWidget>
<WidgetTitle <StyledWidgetStats>
title='Median time to production' <WidgetTitle
tooltip={`How long does it currently take on average from when a feature flag was created until it was enabled in a "production" type environment. This is calculated only from feature flags of the type "release" and is the median across the selected projects.`} title='Median time to production'
/> tooltip={`How long does it currently take on average from when a feature flag was created until it was enabled in a "production" type environment. This is calculated only from feature flags of the type "release" and is the median across the selected projects.`}
<TimeToProduction />
daysToProduction={ <TimeToProduction
summary.medianTimeToProduction daysToProduction={
} summary.medianTimeToProduction
/> }
</StyledWidgetStats> />
<StyledChartContainer> </StyledWidgetStats>
<TimeToProductionChart <StyledChartContainer>
projectFlagTrends={groupedProjectsData} <TimeToProductionChart
isAggregate={showAllProjects} projectFlagTrends={groupedProjectsData}
isLoading={loading} isAggregate={showAllProjects}
/> isLoading={loading}
</StyledChartContainer> />
</StyledWidget> </StyledChartContainer>
</StyledWidget>
) : null}
</> </>
} }
/> />