File tree 3 files changed +5
-3
lines changed
openbas-front/src/admin/components
simulations/simulation/overview
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ const Dashboard = () => {
196
196
< Paper variant = "outlined" classes = { { root : classes . paperWithChart } } >
197
197
{ loading
198
198
? < Loader variant = "inElement" />
199
- : < ResponsePie expectationResultsByTypes = { statistics ?. expectation_results } /> }
199
+ : < ResponsePie expectationResultsByTypes = { statistics ?. expectation_results } isReducedView /> }
200
200
</ Paper >
201
201
</ GridLegacy >
202
202
< GridLegacy item = { true } xs = { 6 } >
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ interface Props {
13
13
expectationResultsByTypes ?: ExpectationResultsByType [ ] | null ;
14
14
humanValidationLink ?: string ;
15
15
disableChartAnimation ?: boolean ;
16
+ isReducedView ?: boolean ;
16
17
}
17
18
18
19
const getTotal = ( distribution : ResultDistribution [ ] ) => {
@@ -43,6 +44,7 @@ const ResponsePie: FunctionComponent<Props> = ({
43
44
expectationResultsByTypes,
44
45
humanValidationLink,
45
46
disableChartAnimation,
47
+ isReducedView = false ,
46
48
} ) => {
47
49
const { t } = useFormatter ( ) ;
48
50
const theme = useTheme ( ) ;
@@ -123,7 +125,7 @@ const ResponsePie: FunctionComponent<Props> = ({
123
125
return (
124
126
< div style = { {
125
127
display : 'grid' ,
126
- width : '100%' ,
128
+ width : isReducedView ? '70%' : '100%' ,
127
129
gridTemplateColumns : '33% 33% 33%' ,
128
130
} }
129
131
>
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ const SimulationComponent = () => {
91
91
>
92
92
{ ! results
93
93
? < Loader variant = "inElement" />
94
- : < ResponsePie expectationResultsByTypes = { results } humanValidationLink = { `/admin/simulations/${ exerciseId } /animation/validations` } /> }
94
+ : < ResponsePie expectationResultsByTypes = { results } humanValidationLink = { `/admin/simulations/${ exerciseId } /animation/validations` } isReducedView /> }
95
95
</ Paper >
96
96
</ div >
97
97
{ injectResults && resultAttackPatternIds . length > 0 && (
You can’t perform that action at this time.
0 commit comments