File tree Expand file tree Collapse file tree
x-pack/plugins/endpoint/public/embeddables/resolver/store Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 * you may not use this file except in compliance with the Elastic License.
55 */
66import { Reducer , combineReducers } from 'redux' ;
7+ import { htmlIdGenerator } from '@elastic/eui' ;
78import { animateProcessIntoView } from './methods' ;
89import { cameraReducer } from './camera/reducer' ;
910import { dataReducer } from './data/reducer' ;
1011import { ResolverState , ResolverAction , ResolverUIState } from '../types' ;
12+ import { uniquePidForProcess } from '../models/process_event' ;
13+
14+ const resolverNodeIdGenerator = htmlIdGenerator ( 'resolverNode' ) ;
1115
1216const uiReducer : Reducer < ResolverUIState , ResolverAction > = (
1317 uiState = { activeDescendantId : null , selectedDescendantId : null } ,
@@ -23,6 +27,12 @@ const uiReducer: Reducer<ResolverUIState, ResolverAction> = (
2327 ...uiState ,
2428 selectedDescendantId : action . payload . nodeId ,
2529 } ;
30+ } else if ( action . type === 'userBroughtProcessIntoView' ) {
31+ const processNodeId = resolverNodeIdGenerator ( uniquePidForProcess ( action . payload . process ) ) ;
32+ return {
33+ ...uiState ,
34+ activeDescendantId : processNodeId ,
35+ } ;
2636 } else {
2737 return uiState ;
2838 }
You can’t perform that action at this time.
0 commit comments