-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Security Solution] Explore Sub Plugin Part 2- Combine Network, Hosts, Users into one Explore Sub Plugin #147468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fd1bf0f
581e357
166f7fa
90d80e7
f843058
0d0439c
110d87d
2e0ff7d
855af61
9ffcfd9
9417e9d
244875d
8a94a1d
bba035e
cac6d42
505c9db
024978c
7843cc8
9a25f82
29f66c1
2a0d8f5
a753286
5147b90
a799e71
8310b4e
8e647b4
5119d6d
7b20fbc
74c0ecd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,61 @@ | ||||||
| /* | ||||||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||||||
| * or more contributor license agreements. Licensed under the Elastic License | ||||||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||||||
| * 2.0. | ||||||
| */ | ||||||
|
|
||||||
| import type { Storage } from '@kbn/kibana-utils-plugin/public'; | ||||||
| import type { AnyAction, Reducer } from 'redux'; | ||||||
| import type { HostsState } from './hosts/store'; | ||||||
| import type { UsersState } from './users/store'; | ||||||
| import { TableId } from '../../common/types'; | ||||||
| import type { SecuritySubPluginWithStore } from '../app/types'; | ||||||
| import { routes } from './routes'; | ||||||
| import type { NetworkState } from './network/store'; | ||||||
| import { initialNetworkState, networkReducer } from './network/store'; | ||||||
| import { getDataTablesInStorageByIds } from '../timelines/containers/local_storage'; | ||||||
| import { initialUsersState, usersReducer } from './users/store'; | ||||||
| import { hostsReducer, initialHostsState } from './hosts/store'; | ||||||
|
|
||||||
| export interface ExploreState { | ||||||
| network: NetworkState; | ||||||
| hosts: HostsState; | ||||||
| users: UsersState; | ||||||
| } | ||||||
|
|
||||||
| export interface ExploreReducer { | ||||||
| network: Reducer<NetworkState, AnyAction>; | ||||||
| hosts: Reducer<HostsState, AnyAction>; | ||||||
| users: Reducer<UsersState, AnyAction>; | ||||||
| } | ||||||
|
|
||||||
| export class Explore { | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @YulNaumenko @elastic/security-threat-hunting-explore this is the part that needs some opinion. I added
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we have the local storage cleanup or utilize functionality, but we have a migration logic: kibana/x-pack/plugins/security_solution/public/timelines/containers/local_storage/index.tsx Lines 60 to 61 in 5a9c04b
Do you think this is something you can use for your case? |
||||||
| public setup() {} | ||||||
|
|
||||||
| public start(storage: Storage): SecuritySubPluginWithStore<'explore', ExploreState> { | ||||||
| return { | ||||||
| routes, | ||||||
| exploreDataTables: { | ||||||
| network: { tableById: getDataTablesInStorageByIds(storage, [TableId.networkPageEvents]) }, | ||||||
| hosts: { | ||||||
| tableById: getDataTablesInStorageByIds(storage, [ | ||||||
| TableId.hostsPageEvents, | ||||||
| TableId.hostsPageSessions, | ||||||
| ]), | ||||||
| }, | ||||||
| users: { | ||||||
| tableById: getDataTablesInStorageByIds(storage, [TableId.usersPageEvents]), | ||||||
| }, | ||||||
| }, | ||||||
| store: { | ||||||
| initialState: { | ||||||
| network: initialNetworkState, | ||||||
| users: initialUsersState, | ||||||
| hosts: initialHostsState, | ||||||
| }, | ||||||
| reducer: { network: networkReducer, users: usersReducer, hosts: hostsReducer }, | ||||||
| }, | ||||||
| }; | ||||||
| } | ||||||
| } | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why, but
usersnever actually utilized this storage.