Skip to content

Commit bd73015

Browse files
author
Brent Kimmel
committed
late change: sync panel icon click
1 parent b57d790 commit bd73015

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • x-pack/plugins/endpoint/public/embeddables/resolver/store

x-pack/plugins/endpoint/public/embeddables/resolver/store/reducer.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66
import { Reducer, combineReducers } from 'redux';
7+
import { htmlIdGenerator } from '@elastic/eui';
78
import { animateProcessIntoView } from './methods';
89
import { cameraReducer } from './camera/reducer';
910
import { dataReducer } from './data/reducer';
1011
import { ResolverState, ResolverAction, ResolverUIState } from '../types';
12+
import { uniquePidForProcess } from '../models/process_event';
13+
14+
const resolverNodeIdGenerator = htmlIdGenerator('resolverNode');
1115

1216
const 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
}

0 commit comments

Comments
 (0)