1
1
import * as React from "react" ;
2
2
import {
3
3
Checkbox ,
4
+ Flex ,
5
+ FlexItem ,
4
6
Form ,
5
7
Text ,
6
8
TextContent ,
7
9
Title ,
10
+ Tooltip ,
8
11
} from "@patternfly/react-core" ;
9
12
import {
10
13
SelectVariant ,
@@ -25,14 +28,20 @@ import { getParsedLabel } from "@app/utils/rules-utils";
25
28
import { DEFAULT_SELECT_MAX_HEIGHT } from "@app/Constants" ;
26
29
import { useFetchTargets } from "@app/queries/targets" ;
27
30
import defaultSources from "./sources" ;
31
+ import { QuestionCircleIcon } from "@patternfly/react-icons" ;
28
32
29
33
export const SetOptions : React . FC = ( ) => {
30
34
const { t } = useTranslation ( ) ;
31
35
32
36
const { watch, control, setValue } =
33
37
useFormContext < AnalysisWizardFormValues > ( ) ;
34
38
35
- const { formLabels, excludedRulesTags, autoTaggingEnabled } = watch ( ) ;
39
+ const {
40
+ formLabels,
41
+ excludedRulesTags,
42
+ autoTaggingEnabled,
43
+ advancedAnalysisEnabled,
44
+ } = watch ( ) ;
36
45
37
46
const [ isSelectTargetsOpen , setSelectTargetsOpen ] = React . useState ( false ) ;
38
47
const [ isSelectSourcesOpen , setSelectSourcesOpen ] = React . useState ( false ) ;
@@ -254,6 +263,30 @@ export const SetOptions: React.FC = () => {
254
263
id = "enable-auto-tagging-checkbox"
255
264
name = "autoTaggingEnabled"
256
265
/>
266
+ < Flex >
267
+ < FlexItem >
268
+ < Checkbox
269
+ className = { spacing . mtMd }
270
+ label = { t ( "wizard.composed.enable" , {
271
+ what : t ( "wizard.terms.advancedAnalysisDetails" ) . toLowerCase ( ) ,
272
+ } ) }
273
+ isChecked = { advancedAnalysisEnabled }
274
+ onChange = { ( ) =>
275
+ setValue ( "advancedAnalysisEnabled" , ! advancedAnalysisEnabled )
276
+ }
277
+ id = "enable-advanced-analysis-details-checkbox"
278
+ name = "advancedAnalysisDetailsEnabled"
279
+ />
280
+ </ FlexItem >
281
+ < FlexItem >
282
+ < Tooltip
283
+ position = "right"
284
+ content = { t ( "wizard.tooltip.advancedAnalysisDetails" ) }
285
+ >
286
+ < QuestionCircleIcon className = { spacing . mlSm } />
287
+ </ Tooltip >
288
+ </ FlexItem >
289
+ </ Flex >
257
290
</ Form >
258
291
) ;
259
292
} ;
0 commit comments