@@ -12,70 +12,81 @@ const navigateTo = (ev, section, params) => {
12
12
AppNavigate . navigateToModule ( ev , section , params ) ;
13
13
} ;
14
14
15
- const renderMitreTechnique = ( technique : string ) => < EuiLink
16
- onClick = { e =>
17
- navigateTo ( e , 'overview' , {
18
- tab : 'mitre' ,
19
- tabView : 'intelligence' ,
20
- tabRedirect : 'techniques' ,
21
- idToRedirect : technique ,
22
- } )
23
- }
24
- >
25
- { technique }
26
- </ EuiLink >
15
+ const renderMitreTechnique = ( technique : string ) => (
16
+ < EuiLink
17
+ onClick = { e =>
18
+ navigateTo ( e , 'overview' , {
19
+ tab : 'mitre' ,
20
+ tabView : 'intelligence' ,
21
+ tabRedirect : 'techniques' ,
22
+ idToRedirect : technique ,
23
+ } )
24
+ }
25
+ >
26
+ { technique }
27
+ </ EuiLink >
28
+ ) ;
27
29
28
30
export const wzDiscoverRenderColumns : tDataGridRenderColumn [ ] = [
29
31
{
30
32
id : 'agent.id' ,
31
- render : ( value ) => {
32
- if ( value === '000' ) return value
33
+ render : value => {
34
+ if ( value === '000' ) return value ;
33
35
34
- return < RedirectAppLinks application = { getCore ( ) . application } >
35
- < EuiLink
36
- href = { `${ endpointSummary . id } #/agents?tab=welcome&agent=${ value } ` }
37
- >
38
- { value }
39
- </ EuiLink >
40
- </ RedirectAppLinks >
41
- }
36
+ return (
37
+ < RedirectAppLinks application = { getCore ( ) . application } >
38
+ < EuiLink
39
+ href = { `${ endpointSummary . id } #/agents?tab=welcome&agent=${ value } ` }
40
+ >
41
+ { value }
42
+ </ EuiLink >
43
+ </ RedirectAppLinks >
44
+ ) ;
45
+ } ,
42
46
} ,
43
47
{
44
48
id : 'agent.name' ,
45
49
render : ( value , row ) => {
46
- if ( row . agent . id === '000' ) return value
50
+ if ( row . agent . id === '000' ) return value ;
47
51
48
- return < RedirectAppLinks application = { getCore ( ) . application } >
49
- < EuiLink
50
- href = { `${ endpointSummary . id } #/agents?tab=welcome&agent=${ row . agent . id } ` }
51
- >
52
- { value }
53
- </ EuiLink >
54
- </ RedirectAppLinks >
55
- }
52
+ return (
53
+ < RedirectAppLinks application = { getCore ( ) . application } >
54
+ < EuiLink
55
+ href = { `${ endpointSummary . id } #/agents?tab=welcome&agent=${ row . agent . id } ` }
56
+ >
57
+ { value }
58
+ </ EuiLink >
59
+ </ RedirectAppLinks >
60
+ ) ;
61
+ } ,
56
62
} ,
57
63
{
58
64
id : 'rule.id' ,
59
- render : ( value ) => < RedirectAppLinks application = { getCore ( ) . application } >
60
- < EuiLink href = { `${ rules . id } #/manager/?tab=rules&redirectRule=${ value } ` } >
61
- { value }
62
- </ EuiLink >
63
- </ RedirectAppLinks >
65
+ render : value => (
66
+ < RedirectAppLinks application = { getCore ( ) . application } >
67
+ < EuiLink href = { `${ rules . id } #/manager/?tab=rules&redirectRule=${ value } ` } >
68
+ { value }
69
+ </ EuiLink >
70
+ </ RedirectAppLinks >
71
+ ) ,
64
72
} ,
65
73
{
66
74
id : 'rule.mitre.id' ,
67
- render : ( value ) => Array . isArray ( value ) ? < div style = { { display : 'flex' , gap : 10 } } >
68
- { value ?. map ( technique => (
69
- < div key = { technique } >
70
- { renderMitreTechnique ( technique ) }
75
+ render : value =>
76
+ Array . isArray ( value ) ? (
77
+ < div style = { { display : 'flex' , gap : 10 } } >
78
+ { value ?. map ( ( technique , index ) => (
79
+ < div key = { `${ technique } -${ index } ` } >
80
+ { renderMitreTechnique ( technique ) }
81
+ </ div >
82
+ ) ) }
71
83
</ div >
72
- ) ) }
73
- </ div > : < div >
74
- { renderMitreTechnique ( value ) }
75
- </ div >
84
+ ) : (
85
+ < div > { renderMitreTechnique ( value ) } </ div >
86
+ ) ,
76
87
} ,
77
88
{
78
89
id : 'timestamp' ,
79
- render : ( value ) => formatUIDate ( value )
90
+ render : value => formatUIDate ( value ) ,
80
91
} ,
81
- ]
92
+ ] ;
0 commit comments