File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
x-pack/solutions/security/plugins/security_solution/public/detections/components/attacks Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { noop } from 'lodash/fp';
1818import type { DataView } from '@kbn/data-views-plugin/common' ;
1919
2020import { useAssistantContext , useLoadConnectors } from '@kbn/elastic-assistant' ;
21+ import { useFindAttackDiscoveries } from '../../../attack_discovery/pages/use_find_attack_discoveries' ;
2122import { useKibana } from '../../../common/lib/kibana' ;
2223import { Schedule } from '../../../attack_discovery/pages/header/schedule' ;
2324import { PAGE_TITLE } from '../../pages/attacks/translations' ;
@@ -67,8 +68,9 @@ export const AttacksPageContent = React.memo(({ dataView }: AttacksPageContentPr
6768 inferenceEnabled,
6869 settings,
6970 } ) ;
70- // TODO: Filter names by connectors that generated attacks
71- const aiConnectorNames = useMemo ( ( ) => aiConnectors ?. map ( ( item ) => item . name ) , [ aiConnectors ] ) ;
71+
72+ const { data } = useFindAttackDiscoveries ( { http, isAssistantEnabled : true } ) ;
73+ const aiConnectorNames = useMemo ( ( ) => data ?. connector_names ?? [ ] , [ data ] ) ;
7274
7375 // showing / hiding the flyout:
7476 const [ showFlyout , setShowFlyout ] = useState < boolean > ( false ) ;
You can’t perform that action at this time.
0 commit comments