1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: show 2 insights components to pro (#7207)

Currently it was showing only users. Now showing 2.
This commit is contained in:
Jaanus Sellin 2024-05-29 12:42:53 +03:00 committed by GitHub
parent 3daa731ed6
commit e79e36daae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -145,21 +145,11 @@ export const InsightsCharts: VFC<IChartsProps> = ({
</ChartWidget> </ChartWidget>
} }
/> />
<ConditionallyRender
condition={isEnterprise()}
show={
<>
<Widget {...chartInfo.totalFlags}> <Widget {...chartInfo.totalFlags}>
<FlagStats <FlagStats
count={ count={showAllProjects ? flags.total : summary.total}
showAllProjects
? flags.total
: summary.total
}
flagsPerUser={ flagsPerUser={
showAllProjects showAllProjects ? getFlagsPerUser(flags, users) : ''
? getFlagsPerUser(flags, users)
: ''
} }
isLoading={loading} isLoading={loading}
/> />
@ -177,14 +167,16 @@ export const InsightsCharts: VFC<IChartsProps> = ({
elseShow={ elseShow={
<ChartWidget {...chartInfo.flagsPerProject}> <ChartWidget {...chartInfo.flagsPerProject}>
<FlagsProjectChart <FlagsProjectChart
projectFlagTrends={ projectFlagTrends={groupedProjectsData}
groupedProjectsData
}
isLoading={loading} isLoading={loading}
/> />
</ChartWidget> </ChartWidget>
} }
/> />
<ConditionallyRender
condition={isEnterprise()}
show={
<>
<Widget {...chartInfo.averageHealth}> <Widget {...chartInfo.averageHealth}>
<HealthStats <HealthStats
value={summary.averageHealth} value={summary.averageHealth}