[Security Solution] Explore Sub Plugin Part 2- Combine Network, Hosts, Users into one Explore Sub Plugin (#147468)

This commit is contained in:
Steph Milovic 2022-12-15 07:52:36 -07:00 committed by GitHub
parent 9a05057364
commit afa186f1c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 317 additions and 415 deletions

View file

@ -18,6 +18,7 @@ import type {
import type { RouteProps } from 'react-router-dom';
import type { AppMountParameters } from '@kbn/core/public';
import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public';
import type { ExploreReducer, ExploreState } from '../explore';
import type { StartServices } from '../types';
/**
@ -38,8 +39,8 @@ import type { TableState } from '../common/store/data_table/types';
export { SecurityPageName } from '../../common/constants';
export interface SecuritySubPluginStore<K extends SecuritySubPluginKeyStore, T> {
initialState: Record<K, T>;
reducer: Record<K, Reducer<T, AnyAction>>;
initialState: K extends 'explore' ? ExploreState : Record<K, T>;
reducer: K extends 'explore' ? ExploreReducer : Record<K, Reducer<T, AnyAction>>;
middleware?: Array<Middleware<{}, State, Dispatch<AppAction | Immutable<AppAction>>>>;
}
@ -48,12 +49,15 @@ export type SecuritySubPluginRoutes = RouteProps[];
export interface SecuritySubPlugin {
routes: SecuritySubPluginRoutes;
storageDataTables?: Pick<TableState, 'tableById'>;
exploreDataTables?: {
network: Pick<TableState, 'tableById'>;
hosts: Pick<TableState, 'tableById'>;
users: Pick<TableState, 'tableById'>;
};
}
export type SecuritySubPluginKeyStore =
| 'hosts'
| 'users'
| 'network'
| 'explore'
| 'timeline'
| 'hostList'
| 'alertList'

View file

@ -110,16 +110,14 @@ export const createStoreFactory = async (
const dataTableInitialState = {
dataTable: {
tableById: {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
/* eslint-disable @typescript-eslint/no-non-null-assertion */
...subPlugins.alerts.storageDataTables!.tableById,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
...subPlugins.rules.storageDataTables!.tableById,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
...subPlugins.exceptions.storageDataTables!.tableById,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
...subPlugins.hosts.storageDataTables!.tableById,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
...subPlugins.network.storageDataTables!.tableById,
...subPlugins.explore.exploreDataTables!.hosts.tableById,
...subPlugins.explore.exploreDataTables!.network.tableById,
...subPlugins.explore.exploreDataTables!.users.tableById,
/* eslint-enable @typescript-eslint/no-non-null-assertion */
},
},
};
@ -132,9 +130,7 @@ export const createStoreFactory = async (
const initialState = createInitialState(
{
...subPlugins.hosts.store.initialState,
...subPlugins.users.store.initialState,
...subPlugins.network.store.initialState,
...subPlugins.explore.store.initialState,
...timelineInitialState,
...subPlugins.management.store.initialState,
},
@ -148,9 +144,7 @@ export const createStoreFactory = async (
);
const rootReducer = {
...subPlugins.hosts.store.reducer,
...subPlugins.users.store.reducer,
...subPlugins.network.store.reducer,
...subPlugins.explore.store.reducer,
timeline: timelineReducer,
...subPlugins.management.store.reducer,
};

View file

@ -1,34 +0,0 @@
/*
* 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 { TableIdLiteral } from '../../../common/types';
import { TableId } from '../../../common/types';
import type { SecuritySubPluginWithStore } from '../../app/types';
import { getDataTablesInStorageByIds } from '../../timelines/containers/local_storage';
import { routes } from './routes';
import type { HostsState } from './store';
import { initialHostsState, hostsReducer } from './store';
const HOST_TABLE_IDS: TableIdLiteral[] = [TableId.hostsPageEvents, TableId.hostsPageSessions];
export class Hosts {
public setup() {}
public start(storage: Storage): SecuritySubPluginWithStore<'hosts', HostsState> {
return {
routes,
storageDataTables: {
tableById: getDataTablesInStorageByIds(storage, HOST_TABLE_IDS),
},
store: {
initialState: { hosts: initialHostsState },
reducer: { hosts: hostsReducer },
},
};
}
}

View file

@ -1,66 +0,0 @@
/*
* 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 { i18n } from '@kbn/i18n';
import { HOSTS_PATH, SecurityPageName } from '../../../common/constants';
import { HOSTS } from '../../app/translations';
import type { LinkItem } from '../../common/links/types';
import hostsPageImg from '../../common/images/hosts_page.png';
export const links: LinkItem = {
id: SecurityPageName.hosts,
title: HOSTS,
landingImage: hostsPageImg,
description: i18n.translate('xpack.securitySolution.landing.threatHunting.hostsDescription', {
defaultMessage: 'A comprehensive overview of all hosts and host-related security events.',
}),
path: HOSTS_PATH,
globalSearchKeywords: [
i18n.translate('xpack.securitySolution.appLinks.hosts', {
defaultMessage: 'Hosts',
}),
],
links: [
{
id: SecurityPageName.uncommonProcesses,
title: i18n.translate('xpack.securitySolution.appLinks.hosts.uncommonProcesses', {
defaultMessage: 'Uncommon Processes',
}),
path: `${HOSTS_PATH}/uncommonProcesses`,
},
{
id: SecurityPageName.hostsAnomalies,
title: i18n.translate('xpack.securitySolution.appLinks.hosts.anomalies', {
defaultMessage: 'Anomalies',
}),
path: `${HOSTS_PATH}/anomalies`,
licenseType: 'gold',
},
{
id: SecurityPageName.hostsEvents,
title: i18n.translate('xpack.securitySolution.appLinks.hosts.events', {
defaultMessage: 'Events',
}),
path: `${HOSTS_PATH}/events`,
},
{
id: SecurityPageName.hostsRisk,
title: i18n.translate('xpack.securitySolution.appLinks.hosts.risk', {
defaultMessage: 'Host risk',
}),
path: `${HOSTS_PATH}/hostRisk`,
},
{
id: SecurityPageName.sessions,
title: i18n.translate('xpack.securitySolution.appLinks.hosts.sessions', {
defaultMessage: 'Sessions',
}),
path: `${HOSTS_PATH}/sessions`,
isBeta: false,
licenseType: 'enterprise',
},
],
};

View file

@ -1,29 +0,0 @@
/*
* 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 React from 'react';
import { TrackApplicationView } from '@kbn/usage-collection-plugin/public';
import { HostsContainer } from './pages';
import type { SecuritySubPluginRoutes } from '../../app/types';
import { SecurityPageName } from '../../app/types';
import { HOSTS_PATH } from '../../../common/constants';
import { PluginTemplateWrapper } from '../../common/components/plugin_template_wrapper';
export const HostsRoutes = () => (
<PluginTemplateWrapper>
<TrackApplicationView viewId={SecurityPageName.hosts}>
<HostsContainer />
</TrackApplicationView>
</PluginTemplateWrapper>
);
export const routes: SecuritySubPluginRoutes = [
{
path: HOSTS_PATH,
component: HostsRoutes,
},
];

View file

@ -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 {
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 },
},
};
}
}

View file

@ -0,0 +1,172 @@
/*
* 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 { i18n } from '@kbn/i18n';
import { HOSTS_PATH, NETWORK_PATH, SecurityPageName, USERS_PATH } from '../../common/constants';
import { HOSTS, NETWORK, USERS } from '../app/translations';
import type { LinkItem } from '../common/links/types';
import hostsPageImg from '../common/images/hosts_page.png';
import userPageImg from '../common/images/users_page.png';
import networkPageImg from '../common/images/network_page.png';
const networkLinks: LinkItem = {
id: SecurityPageName.network,
title: NETWORK,
landingImage: networkPageImg,
description: i18n.translate('xpack.securitySolution.appLinks.network.description', {
defaultMessage:
'Provides key activity metrics in an interactive map as well as event tables that enable interaction with the Timeline.',
}),
path: NETWORK_PATH,
globalSearchKeywords: [
i18n.translate('xpack.securitySolution.appLinks.network', {
defaultMessage: 'Network',
}),
],
links: [
{
id: SecurityPageName.networkDns,
title: i18n.translate('xpack.securitySolution.appLinks.network.dns', {
defaultMessage: 'DNS',
}),
path: `${NETWORK_PATH}/dns`,
},
{
id: SecurityPageName.networkHttp,
title: i18n.translate('xpack.securitySolution.appLinks.network.http', {
defaultMessage: 'HTTP',
}),
path: `${NETWORK_PATH}/http`,
},
{
id: SecurityPageName.networkTls,
title: i18n.translate('xpack.securitySolution.appLinks.network.tls', {
defaultMessage: 'TLS',
}),
path: `${NETWORK_PATH}/tls`,
},
{
id: SecurityPageName.networkAnomalies,
title: i18n.translate('xpack.securitySolution.appLinks.hosts.anomalies', {
defaultMessage: 'Anomalies',
}),
path: `${NETWORK_PATH}/anomalies`,
licenseType: 'gold',
},
{
id: SecurityPageName.networkEvents,
title: i18n.translate('xpack.securitySolution.appLinks.network.events', {
defaultMessage: 'Events',
}),
path: `${NETWORK_PATH}/events`,
},
],
};
const usersLinks: LinkItem = {
id: SecurityPageName.users,
title: USERS,
landingImage: userPageImg,
description: i18n.translate('xpack.securitySolution.appLinks.users.description', {
defaultMessage:
'A comprehensive overview of user data that enables understanding of authentication and user behavior within your environment.',
}),
path: USERS_PATH,
globalSearchKeywords: [
i18n.translate('xpack.securitySolution.appLinks.users', {
defaultMessage: 'Users',
}),
],
links: [
{
id: SecurityPageName.usersAuthentications,
title: i18n.translate('xpack.securitySolution.appLinks.users.authentications', {
defaultMessage: 'Authentications',
}),
path: `${USERS_PATH}/authentications`,
},
{
id: SecurityPageName.usersAnomalies,
title: i18n.translate('xpack.securitySolution.appLinks.users.anomalies', {
defaultMessage: 'Anomalies',
}),
path: `${USERS_PATH}/anomalies`,
licenseType: 'gold',
},
{
id: SecurityPageName.usersRisk,
title: i18n.translate('xpack.securitySolution.appLinks.users.risk', {
defaultMessage: 'User risk',
}),
path: `${USERS_PATH}/userRisk`,
},
{
id: SecurityPageName.usersEvents,
title: i18n.translate('xpack.securitySolution.appLinks.users.events', {
defaultMessage: 'Events',
}),
path: `${USERS_PATH}/events`,
},
],
};
const hostsLinks: LinkItem = {
id: SecurityPageName.hosts,
title: HOSTS,
landingImage: hostsPageImg,
description: i18n.translate('xpack.securitySolution.landing.threatHunting.hostsDescription', {
defaultMessage: 'A comprehensive overview of all hosts and host-related security events.',
}),
path: HOSTS_PATH,
globalSearchKeywords: [
i18n.translate('xpack.securitySolution.appLinks.hosts', {
defaultMessage: 'Hosts',
}),
],
links: [
{
id: SecurityPageName.uncommonProcesses,
title: i18n.translate('xpack.securitySolution.appLinks.hosts.uncommonProcesses', {
defaultMessage: 'Uncommon Processes',
}),
path: `${HOSTS_PATH}/uncommonProcesses`,
},
{
id: SecurityPageName.hostsAnomalies,
title: i18n.translate('xpack.securitySolution.appLinks.hosts.anomalies', {
defaultMessage: 'Anomalies',
}),
path: `${HOSTS_PATH}/anomalies`,
licenseType: 'gold',
},
{
id: SecurityPageName.hostsEvents,
title: i18n.translate('xpack.securitySolution.appLinks.hosts.events', {
defaultMessage: 'Events',
}),
path: `${HOSTS_PATH}/events`,
},
{
id: SecurityPageName.hostsRisk,
title: i18n.translate('xpack.securitySolution.appLinks.hosts.risk', {
defaultMessage: 'Host risk',
}),
path: `${HOSTS_PATH}/hostRisk`,
},
{
id: SecurityPageName.sessions,
title: i18n.translate('xpack.securitySolution.appLinks.hosts.sessions', {
defaultMessage: 'Sessions',
}),
path: `${HOSTS_PATH}/sessions`,
isBeta: false,
licenseType: 'enterprise',
},
],
};
export const exploreLinks = [hostsLinks, networkLinks, usersLinks];

View file

@ -1,31 +0,0 @@
/*
* 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 { TableId } from '../../../common/types';
import type { SecuritySubPluginWithStore } from '../../app/types';
import { routes } from './routes';
import type { NetworkState } from './store';
import { initialNetworkState, networkReducer } from './store';
import { getDataTablesInStorageByIds } from '../../timelines/containers/local_storage';
export class Network {
public setup() {}
public start(storage: Storage): SecuritySubPluginWithStore<'network', NetworkState> {
return {
routes,
storageDataTables: {
tableById: getDataTablesInStorageByIds(storage, [TableId.networkPageEvents]),
},
store: {
initialState: { network: initialNetworkState },
reducer: { network: networkReducer },
},
};
}
}

View file

@ -1,66 +0,0 @@
/*
* 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 { i18n } from '@kbn/i18n';
import { NETWORK_PATH, SecurityPageName } from '../../../common/constants';
import { NETWORK } from '../../app/translations';
import type { LinkItem } from '../../common/links/types';
import networkPageImg from '../../common/images/network_page.png';
export const links: LinkItem = {
id: SecurityPageName.network,
title: NETWORK,
landingImage: networkPageImg,
description: i18n.translate('xpack.securitySolution.appLinks.network.description', {
defaultMessage:
'Provides key activity metrics in an interactive map as well as event tables that enable interaction with the Timeline.',
}),
path: NETWORK_PATH,
globalSearchKeywords: [
i18n.translate('xpack.securitySolution.appLinks.network', {
defaultMessage: 'Network',
}),
],
links: [
{
id: SecurityPageName.networkDns,
title: i18n.translate('xpack.securitySolution.appLinks.network.dns', {
defaultMessage: 'DNS',
}),
path: `${NETWORK_PATH}/dns`,
},
{
id: SecurityPageName.networkHttp,
title: i18n.translate('xpack.securitySolution.appLinks.network.http', {
defaultMessage: 'HTTP',
}),
path: `${NETWORK_PATH}/http`,
},
{
id: SecurityPageName.networkTls,
title: i18n.translate('xpack.securitySolution.appLinks.network.tls', {
defaultMessage: 'TLS',
}),
path: `${NETWORK_PATH}/tls`,
},
{
id: SecurityPageName.networkAnomalies,
title: i18n.translate('xpack.securitySolution.appLinks.hosts.anomalies', {
defaultMessage: 'Anomalies',
}),
path: `${NETWORK_PATH}/anomalies`,
licenseType: 'gold',
},
{
id: SecurityPageName.networkEvents,
title: i18n.translate('xpack.securitySolution.appLinks.network.events', {
defaultMessage: 'Events',
}),
path: `${NETWORK_PATH}/events`,
},
],
};

View file

@ -1,30 +0,0 @@
/*
* 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 React from 'react';
import { TrackApplicationView } from '@kbn/usage-collection-plugin/public';
import { NetworkContainer } from './pages';
import type { SecuritySubPluginRoutes } from '../../app/types';
import { SecurityPageName } from '../../app/types';
import { NETWORK_PATH } from '../../../common/constants';
import { PluginTemplateWrapper } from '../../common/components/plugin_template_wrapper';
export const NetworkRoutes = () => (
<PluginTemplateWrapper>
<TrackApplicationView viewId={SecurityPageName.network}>
<NetworkContainer />
</TrackApplicationView>
</PluginTemplateWrapper>
);
export const routes: SecuritySubPluginRoutes = [
{
path: NETWORK_PATH,
component: NetworkRoutes,
},
];

View file

@ -0,0 +1,56 @@
/*
* 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 React from 'react';
import { TrackApplicationView } from '@kbn/usage-collection-plugin/public';
import { UsersContainer } from './users/pages';
import { HostsContainer } from './hosts/pages';
import { NetworkContainer } from './network/pages';
import type { SecuritySubPluginRoutes } from '../app/types';
import { SecurityPageName } from '../app/types';
import { HOSTS_PATH, NETWORK_PATH, USERS_PATH } from '../../common/constants';
import { PluginTemplateWrapper } from '../common/components/plugin_template_wrapper';
const NetworkRoutes = () => (
<PluginTemplateWrapper>
<TrackApplicationView viewId={SecurityPageName.network}>
<NetworkContainer />
</TrackApplicationView>
</PluginTemplateWrapper>
);
const UsersRoutes = () => (
<PluginTemplateWrapper>
<TrackApplicationView viewId={SecurityPageName.users}>
<UsersContainer />
</TrackApplicationView>
</PluginTemplateWrapper>
);
const HostsRoutes = () => (
<PluginTemplateWrapper>
<TrackApplicationView viewId={SecurityPageName.hosts}>
<HostsContainer />
</TrackApplicationView>
</PluginTemplateWrapper>
);
export const routes: SecuritySubPluginRoutes = [
{
path: NETWORK_PATH,
component: NetworkRoutes,
},
{
path: USERS_PATH,
component: UsersRoutes,
},
{
path: HOSTS_PATH,
component: HostsRoutes,
},
];

View file

@ -1,26 +0,0 @@
/*
* 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 { SecuritySubPluginWithStore } from '../../app/types';
import { routes } from './routes';
import type { usersModel } from './store';
import { initialUsersState, usersReducer } from './store';
export class Users {
public setup() {}
public start(storage: Storage): SecuritySubPluginWithStore<'users', usersModel.UsersModel> {
return {
routes,
store: {
initialState: { users: initialUsersState },
reducer: { users: usersReducer },
},
};
}
}

View file

@ -1,59 +0,0 @@
/*
* 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 { i18n } from '@kbn/i18n';
import { SecurityPageName, USERS_PATH } from '../../../common/constants';
import { USERS } from '../../app/translations';
import type { LinkItem } from '../../common/links/types';
import userPageImg from '../../common/images/users_page.png';
export const links: LinkItem = {
id: SecurityPageName.users,
title: USERS,
landingImage: userPageImg,
description: i18n.translate('xpack.securitySolution.appLinks.users.description', {
defaultMessage:
'A comprehensive overview of user data that enables understanding of authentication and user behavior within your environment.',
}),
path: USERS_PATH,
globalSearchKeywords: [
i18n.translate('xpack.securitySolution.appLinks.users', {
defaultMessage: 'Users',
}),
],
links: [
{
id: SecurityPageName.usersAuthentications,
title: i18n.translate('xpack.securitySolution.appLinks.users.authentications', {
defaultMessage: 'Authentications',
}),
path: `${USERS_PATH}/authentications`,
},
{
id: SecurityPageName.usersAnomalies,
title: i18n.translate('xpack.securitySolution.appLinks.users.anomalies', {
defaultMessage: 'Anomalies',
}),
path: `${USERS_PATH}/anomalies`,
licenseType: 'gold',
},
{
id: SecurityPageName.usersRisk,
title: i18n.translate('xpack.securitySolution.appLinks.users.risk', {
defaultMessage: 'User risk',
}),
path: `${USERS_PATH}/userRisk`,
},
{
id: SecurityPageName.usersEvents,
title: i18n.translate('xpack.securitySolution.appLinks.users.events', {
defaultMessage: 'Events',
}),
path: `${USERS_PATH}/events`,
},
],
};

View file

@ -1,30 +0,0 @@
/*
* 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 React from 'react';
import { TrackApplicationView } from '@kbn/usage-collection-plugin/public';
import { UsersContainer } from './pages';
import type { SecuritySubPluginRoutes } from '../../app/types';
import { SecurityPageName } from '../../app/types';
import { USERS_PATH } from '../../../common/constants';
import { PluginTemplateWrapper } from '../../common/components/plugin_template_wrapper';
export const UsersRoutes = () => (
<PluginTemplateWrapper>
<TrackApplicationView viewId={SecurityPageName.users}>
<UsersContainer />
</TrackApplicationView>
</PluginTemplateWrapper>
);
export const routes: SecuritySubPluginRoutes = [
{
path: USERS_PATH,
component: UsersRoutes,
},
];

View file

@ -25,7 +25,9 @@ import { Direction } from '../../../../common/search_strategy/common';
import { RiskScoreFields } from '../../../../common/search_strategy';
import { UsersFields } from '../../../../common/search_strategy/security_solution/users/common';
export const initialUsersState: UsersModel = {
export type UsersState = UsersModel;
export const initialUsersState: UsersState = {
page: {
queries: {
[UsersTableType.allUsers]: {

View file

@ -15,9 +15,7 @@ import {
import { DASHBOARDS, EXPLORE } from '../app/translations';
import type { LinkItem } from '../common/links/types';
import { overviewLinks, detectionResponseLinks, entityAnalyticsLinks } from '../overview/links';
import { links as hostsLinks } from '../explore/hosts/links';
import { links as networkLinks } from '../explore/network/links';
import { links as usersLinks } from '../explore/users/links';
import { exploreLinks } from '../explore/links';
import { links as kubernetesLinks } from '../kubernetes/links';
import { dashboardLinks as cloudSecurityPostureLinks } from '../cloud_security_posture/links';
@ -53,6 +51,6 @@ export const threatHuntingLandingLinks: LinkItem = {
defaultMessage: 'Explore',
}),
],
links: [hostsLinks, networkLinks, usersLinks],
links: exploreLinks,
skipUrlState: true,
};

View file

@ -13,9 +13,7 @@
import { Cases } from './cases';
import { Detections } from './detections';
import { Exceptions } from './exceptions';
import { Hosts } from './explore/hosts';
import { Users } from './explore/users';
import { Network } from './explore/network';
import { Explore } from './explore';
import { Kubernetes } from './kubernetes';
import { Overview } from './overview';
import { Rules } from './rules';
@ -32,9 +30,7 @@ const subPluginClasses = {
Detections,
Cases,
Exceptions,
Hosts,
Users,
Network,
Explore,
Kubernetes,
Overview,
Rules,

View file

@ -347,9 +347,7 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S
rules: new subPluginClasses.Rules(),
exceptions: new subPluginClasses.Exceptions(),
cases: new subPluginClasses.Cases(),
hosts: new subPluginClasses.Hosts(),
users: new subPluginClasses.Users(),
network: new subPluginClasses.Network(),
explore: new subPluginClasses.Explore(),
kubernetes: new subPluginClasses.Kubernetes(),
overview: new subPluginClasses.Overview(),
timelines: new subPluginClasses.Timelines(),
@ -377,9 +375,7 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S
cases: subPlugins.cases.start(),
rules: subPlugins.rules.start(storage),
exceptions: subPlugins.exceptions.start(storage),
hosts: subPlugins.hosts.start(storage),
users: subPlugins.users.start(storage),
network: subPlugins.network.start(storage),
explore: subPlugins.explore.start(storage),
timelines: subPlugins.timelines.start(),
kubernetes: subPlugins.kubernetes.start(),
management: subPlugins.management.start(core, plugins),

View file

@ -47,9 +47,6 @@ import type { Inspect } from '../common/search_strategy';
import type { Detections } from './detections';
import type { Cases } from './cases';
import type { Exceptions } from './exceptions';
import type { Hosts } from './explore/hosts';
import type { Users } from './explore/users';
import type { Network } from './explore/network';
import type { Kubernetes } from './kubernetes';
import type { Overview } from './overview';
import type { Rules } from './rules';
@ -59,6 +56,7 @@ import type { LandingPages } from './landing_pages';
import type { CloudSecurityPosture } from './cloud_security_posture';
import type { ThreatIntelligence } from './threat_intelligence';
import type { SecuritySolutionTemplateWrapper } from './app/home/template_wrapper';
import type { Explore } from './explore';
export interface SetupPlugins {
home?: HomePublicPluginSetup;
@ -136,9 +134,7 @@ export interface SubPlugins {
rules: Rules;
exceptions: Exceptions;
[CASES_SUB_PLUGIN_KEY]: Cases;
hosts: Hosts;
users: Users;
network: Network;
explore: Explore;
kubernetes: Kubernetes;
overview: Overview;
timelines: Timelines;
@ -154,9 +150,7 @@ export interface StartedSubPlugins {
rules: ReturnType<Rules['start']>;
exceptions: ReturnType<Exceptions['start']>;
[CASES_SUB_PLUGIN_KEY]: ReturnType<Cases['start']>;
hosts: ReturnType<Hosts['start']>;
users: ReturnType<Users['start']>;
network: ReturnType<Network['start']>;
explore: ReturnType<Explore['start']>;
kubernetes: ReturnType<Kubernetes['start']>;
overview: ReturnType<Overview['start']>;
timelines: ReturnType<Timelines['start']>;