diff --git a/x-pack/plugins/security_solution/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts index a34a76361f79..bf9cf7486810 100644 --- a/x-pack/plugins/security_solution/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -51,7 +51,7 @@ export const APP_HOSTS_PATH = `${APP_PATH}/hosts`; export const APP_NETWORK_PATH = `${APP_PATH}/network`; export const APP_TIMELINES_PATH = `${APP_PATH}/timelines`; export const APP_CASES_PATH = `${APP_PATH}/cases`; -export const APP_MANAGEMENT_PATH = `${APP_PATH}/management`; +export const APP_MANAGEMENT_PATH = `${APP_PATH}/administration`; /** The comma-delimited list of Elasticsearch indices from which the SIEM app collects events */ export const DEFAULT_INDEX_PATTERN = [ diff --git a/x-pack/plugins/security_solution/cypress/integration/navigation.spec.ts b/x-pack/plugins/security_solution/cypress/integration/navigation.spec.ts index ea3a78c77152..7864160d5bca 100644 --- a/x-pack/plugins/security_solution/cypress/integration/navigation.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/navigation.spec.ts @@ -21,7 +21,7 @@ import { CASES_URL, HOSTS_URL, KIBANA_HOME, - MANAGEMENT_URL, + ADMINISTRATION_URL, NETWORK_URL, OVERVIEW_URL, TIMELINES_URL, @@ -31,7 +31,7 @@ import { ALERTS_PAGE, CASES_PAGE, HOSTS_PAGE, - MANAGEMENT_PAGE, + ADMINISTRATION_PAGE, NETWORK_PAGE, OVERVIEW_PAGE, TIMELINES_PAGE, @@ -72,9 +72,9 @@ describe('top-level navigation common to all pages in the Security app', () => { cy.url().should('include', CASES_URL); }); - it('navigates to the Management page', () => { + it('navigates to the Administration page', () => { navigateFromHeaderTo(MANAGEMENT); - cy.url().should('include', MANAGEMENT_URL); + cy.url().should('include', ADMINISTRATION_URL); }); }); @@ -115,8 +115,8 @@ describe('Kibana navigation to all pages in the Security app ', () => { cy.url().should('include', CASES_URL); }); - it('navigates to the Management page', () => { - navigateFromKibanaCollapsibleTo(MANAGEMENT_PAGE); - cy.url().should('include', MANAGEMENT_URL); + it('navigates to the Administration page', () => { + navigateFromKibanaCollapsibleTo(ADMINISTRATION_PAGE); + cy.url().should('include', ADMINISTRATION_URL); }); }); diff --git a/x-pack/plugins/security_solution/cypress/screens/kibana_navigation.ts b/x-pack/plugins/security_solution/cypress/screens/kibana_navigation.ts index 2f7956ce370b..eeec19fa3dd1 100644 --- a/x-pack/plugins/security_solution/cypress/screens/kibana_navigation.ts +++ b/x-pack/plugins/security_solution/cypress/screens/kibana_navigation.ts @@ -12,8 +12,8 @@ export const HOSTS_PAGE = '[data-test-subj="collapsibleNavGroup-security"] [titl export const KIBANA_NAVIGATION_TOGGLE = '[data-test-subj="toggleNavButton"]'; -export const MANAGEMENT_PAGE = - '[data-test-subj="collapsibleNavGroup-security"] [title="Management"]'; +export const ADMINISTRATION_PAGE = + '[data-test-subj="collapsibleNavGroup-security"] [title="Administration"]'; export const NETWORK_PAGE = '[data-test-subj="collapsibleNavGroup-security"] [title="Network"]'; diff --git a/x-pack/plugins/security_solution/cypress/urls/navigation.ts b/x-pack/plugins/security_solution/cypress/urls/navigation.ts index 9da9abf388e4..e53dac157eed 100644 --- a/x-pack/plugins/security_solution/cypress/urls/navigation.ts +++ b/x-pack/plugins/security_solution/cypress/urls/navigation.ts @@ -16,7 +16,7 @@ export const HOSTS_PAGE_TAB_URLS = { uncommonProcesses: '/app/security/hosts/uncommonProcesses', }; export const KIBANA_HOME = '/app/home#/'; -export const MANAGEMENT_URL = '/app/security/management'; +export const ADMINISTRATION_URL = '/app/security/administration'; export const NETWORK_URL = '/app/security/network'; export const OVERVIEW_URL = '/app/security/overview'; export const TIMELINES_URL = '/app/security/timelines'; diff --git a/x-pack/plugins/security_solution/public/app/home/home_navigations.tsx b/x-pack/plugins/security_solution/public/app/home/home_navigations.tsx index 88e9d4179a97..d7acda498857 100644 --- a/x-pack/plugins/security_solution/public/app/home/home_navigations.tsx +++ b/x-pack/plugins/security_solution/public/app/home/home_navigations.tsx @@ -27,7 +27,7 @@ export const navTabs: SiemNavTab = { }, [SecurityPageName.alerts]: { id: SecurityPageName.alerts, - name: i18n.Alerts, + name: i18n.ALERTS, href: APP_ALERTS_PATH, disabled: false, urlKey: 'alerts', @@ -63,7 +63,7 @@ export const navTabs: SiemNavTab = { }, [SecurityPageName.management]: { id: SecurityPageName.management, - name: i18n.MANAGEMENT, + name: i18n.ADMINISTRATION, href: APP_MANAGEMENT_PATH, disabled: false, urlKey: SecurityPageName.management, diff --git a/x-pack/plugins/security_solution/public/app/home/translations.ts b/x-pack/plugins/security_solution/public/app/home/translations.ts index f5a08e6395f1..bee1dfe33385 100644 --- a/x-pack/plugins/security_solution/public/app/home/translations.ts +++ b/x-pack/plugins/security_solution/public/app/home/translations.ts @@ -25,7 +25,7 @@ export const DETECTION_ENGINE = i18n.translate( } ); -export const Alerts = i18n.translate('xpack.securitySolution.navigation.alerts', { +export const ALERTS = i18n.translate('xpack.securitySolution.navigation.alerts', { defaultMessage: 'Alerts', }); @@ -37,6 +37,6 @@ export const CASE = i18n.translate('xpack.securitySolution.navigation.case', { defaultMessage: 'Cases', }); -export const MANAGEMENT = i18n.translate('xpack.securitySolution.navigation.management', { - defaultMessage: 'Management', +export const ADMINISTRATION = i18n.translate('xpack.securitySolution.navigation.administration', { + defaultMessage: 'Administration', }); diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/index.test.tsx index 10f8b11b4d9c..2ad83d37576b 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/index.test.tsx @@ -108,9 +108,9 @@ describe('SIEM Navigation', () => { }, management: { disabled: false, - href: '/app/security/management', + href: '/app/security/administration', id: 'management', - name: 'Management', + name: 'Administration', urlKey: 'management', }, hosts: { @@ -220,9 +220,9 @@ describe('SIEM Navigation', () => { }, management: { disabled: false, - href: '/app/security/management', + href: '/app/security/administration', id: 'management', - name: 'Management', + name: 'Administration', urlKey: 'management', }, network: { diff --git a/x-pack/plugins/security_solution/public/management/common/constants.ts b/x-pack/plugins/security_solution/public/management/common/constants.ts index 0fad1273c727..4bc586bdee8a 100644 --- a/x-pack/plugins/security_solution/public/management/common/constants.ts +++ b/x-pack/plugins/security_solution/public/management/common/constants.ts @@ -10,7 +10,7 @@ import { SecurityPageName } from '../../app/types'; // --[ ROUTING ]--------------------------------------------------------------------------- export const MANAGEMENT_APP_ID = `${APP_ID}:${SecurityPageName.management}`; export const MANAGEMENT_ROUTING_ROOT_PATH = ''; -export const MANAGEMENT_ROUTING_ENDPOINTS_PATH = `${MANAGEMENT_ROUTING_ROOT_PATH}/:tabName(${ManagementSubTab.endpoints})`; +export const MANAGEMENT_ROUTING_HOSTS_PATH = `${MANAGEMENT_ROUTING_ROOT_PATH}/:tabName(${ManagementSubTab.hosts})`; export const MANAGEMENT_ROUTING_POLICIES_PATH = `${MANAGEMENT_ROUTING_ROOT_PATH}/:tabName(${ManagementSubTab.policies})`; export const MANAGEMENT_ROUTING_POLICY_DETAILS_PATH = `${MANAGEMENT_ROUTING_ROOT_PATH}/:tabName(${ManagementSubTab.policies})/:policyId`; @@ -21,5 +21,5 @@ export const MANAGEMENT_STORE_GLOBAL_NAMESPACE: ManagementStoreGlobalNamespace = export const MANAGEMENT_STORE_POLICY_LIST_NAMESPACE = 'policyList'; /** Namespace within the Management state where policy details state is maintained */ export const MANAGEMENT_STORE_POLICY_DETAILS_NAMESPACE = 'policyDetails'; -/** Namespace within the Management state where endpoints state is maintained */ -export const MANAGEMENT_STORE_ENDPOINTS_NAMESPACE = 'endpoints'; +/** Namespace within the Management state where hosts state is maintained */ +export const MANAGEMENT_STORE_HOSTS_NAMESPACE = 'hosts'; diff --git a/x-pack/plugins/security_solution/public/management/common/routing.ts b/x-pack/plugins/security_solution/public/management/common/routing.ts index 92eb7717318d..5add6b753a7a 100644 --- a/x-pack/plugins/security_solution/public/management/common/routing.ts +++ b/x-pack/plugins/security_solution/public/management/common/routing.ts @@ -10,7 +10,7 @@ import { generatePath } from 'react-router-dom'; import querystring from 'querystring'; import { - MANAGEMENT_ROUTING_ENDPOINTS_PATH, + MANAGEMENT_ROUTING_HOSTS_PATH, MANAGEMENT_ROUTING_POLICIES_PATH, MANAGEMENT_ROUTING_POLICY_DETAILS_PATH, } from './constants'; @@ -32,11 +32,11 @@ const querystringStringify: ( ) => string = querystring.stringify; /** Make `selected_host` required */ -type EndpointDetailsUrlProps = Omit & +type HostDetailsUrlProps = Omit & Required>; -export const getEndpointListPath = ( - props: { name: 'default' | 'endpointList' } & HostIndexUIQueryParams, +export const getHostListPath = ( + props: { name: 'default' | 'hostList' } & HostIndexUIQueryParams, search?: string ) => { const { name, ...queryParams } = props; @@ -45,29 +45,27 @@ export const getEndpointListPath = ( ); const urlSearch = `${urlQueryParams && !isEmpty(search) ? '&' : ''}${search ?? ''}`; - if (name === 'endpointList') { - return `${generatePath(MANAGEMENT_ROUTING_ENDPOINTS_PATH, { - tabName: ManagementSubTab.endpoints, + if (name === 'hostList') { + return `${generatePath(MANAGEMENT_ROUTING_HOSTS_PATH, { + tabName: ManagementSubTab.hosts, })}${appendSearch(`${urlQueryParams ? `${urlQueryParams}${urlSearch}` : urlSearch}`)}`; } return `${appendSearch(`${urlQueryParams ? `${urlQueryParams}${urlSearch}` : urlSearch}`)}`; }; -export const getEndpointDetailsPath = ( - props: { name: 'endpointDetails' | 'endpointPolicyResponse' } & EndpointDetailsUrlProps, +export const getHostDetailsPath = ( + props: { name: 'hostDetails' | 'hostPolicyResponse' } & HostDetailsUrlProps, search?: string ) => { const { name, ...queryParams } = props; - queryParams.show = (props.name === 'endpointPolicyResponse' + queryParams.show = (props.name === 'hostPolicyResponse' ? 'policy_response' : '') as HostIndexUIQueryParams['show']; - const urlQueryParams = querystringStringify( - queryParams - ); + const urlQueryParams = querystringStringify(queryParams); const urlSearch = `${urlQueryParams && !isEmpty(search) ? '&' : ''}${search ?? ''}`; - return `${generatePath(MANAGEMENT_ROUTING_ENDPOINTS_PATH, { - tabName: ManagementSubTab.endpoints, + return `${generatePath(MANAGEMENT_ROUTING_HOSTS_PATH, { + tabName: ManagementSubTab.hosts, })}${appendSearch(`${urlQueryParams ? `${urlQueryParams}${urlSearch}` : urlSearch}`)}`; }; diff --git a/x-pack/plugins/security_solution/public/management/components/management_empty_state.tsx b/x-pack/plugins/security_solution/public/management/components/management_empty_state.tsx index 5dd47d4e8802..c3d6cb48e4da 100644 --- a/x-pack/plugins/security_solution/public/management/components/management_empty_state.tsx +++ b/x-pack/plugins/security_solution/public/management/components/management_empty_state.tsx @@ -103,7 +103,7 @@ const PolicyEmptyState = React.memo<{ ); }); -const EndpointsEmptyState = React.memo<{ +const HostsEmptyState = React.memo<{ loading: boolean; onActionClick: (event: MouseEvent) => void; actionDisabled: boolean; @@ -113,14 +113,14 @@ const EndpointsEmptyState = React.memo<{ const policySteps = useMemo( () => [ { - title: i18n.translate('xpack.securitySolution.endpoint.endpointList.stepOneTitle', { + title: i18n.translate('xpack.securitySolution.endpoint.hostList.stepOneTitle', { defaultMessage: 'Select a policy you created from the list below.', }), children: ( <> @@ -138,7 +138,7 @@ const EndpointsEmptyState = React.memo<{ return loading ? ( @@ -146,7 +146,7 @@ const EndpointsEmptyState = React.memo<{ list ) : ( ); @@ -156,14 +156,14 @@ const EndpointsEmptyState = React.memo<{ ), }, { - title: i18n.translate('xpack.securitySolution.endpoint.endpointList.stepTwoTitle', { + title: i18n.translate('xpack.securitySolution.endpoint.hostList.stepTwoTitle', { defaultMessage: 'Head over to Ingest to deploy your Agent with Endpoint Security enabled.', }), children: ( @@ -178,18 +178,18 @@ const EndpointsEmptyState = React.memo<{ loading={loading} onActionClick={onActionClick} actionDisabled={actionDisabled} - dataTestSubj="emptyEndpointsTable" + dataTestSubj="emptyHostsTable" steps={policySteps} headerComponent={ } bodyComponent={ } /> @@ -271,7 +271,7 @@ const ManagementEmptyState = React.memo<{ ); PolicyEmptyState.displayName = 'PolicyEmptyState'; -EndpointsEmptyState.displayName = 'EndpointsEmptyState'; +HostsEmptyState.displayName = 'HostsEmptyState'; ManagementEmptyState.displayName = 'ManagementEmptyState'; -export { PolicyEmptyState, EndpointsEmptyState, ManagementEmptyState }; +export { PolicyEmptyState, HostsEmptyState, ManagementEmptyState }; diff --git a/x-pack/plugins/security_solution/public/management/components/management_page_view.tsx b/x-pack/plugins/security_solution/public/management/components/management_page_view.tsx index c3dbb93b369a..8495628709d2 100644 --- a/x-pack/plugins/security_solution/public/management/components/management_page_view.tsx +++ b/x-pack/plugins/security_solution/public/management/components/management_page_view.tsx @@ -11,7 +11,7 @@ import { PageView, PageViewProps } from '../../common/components/endpoint/page_v import { ManagementSubTab } from '../types'; import { SecurityPageName } from '../../app/types'; import { useFormatUrl } from '../../common/components/link_to'; -import { getEndpointListPath, getPoliciesPath } from '../common/routing'; +import { getHostListPath, getPoliciesPath } from '../common/routing'; import { useNavigateByRouterEventHandler } from '../../common/hooks/endpoint/use_navigate_by_router_event_handler'; export const ManagementPageView = memo>((options) => { @@ -19,7 +19,7 @@ export const ManagementPageView = memo>((options) => const { tabName } = useParams<{ tabName: ManagementSubTab }>(); const goToEndpoint = useNavigateByRouterEventHandler( - getEndpointListPath({ name: 'endpointList' }, search) + getHostListPath({ name: 'hostList' }, search) ); const goToPolicies = useNavigateByRouterEventHandler(getPoliciesPath(search)); @@ -31,11 +31,11 @@ export const ManagementPageView = memo>((options) => return [ { name: i18n.translate('xpack.securitySolution.managementTabs.endpoints', { - defaultMessage: 'Endpoints', + defaultMessage: 'Hosts', }), - id: ManagementSubTab.endpoints, - isSelected: tabName === ManagementSubTab.endpoints, - href: formatUrl(getEndpointListPath({ name: 'endpointList' })), + id: ManagementSubTab.hosts, + isSelected: tabName === ManagementSubTab.hosts, + href: formatUrl(getHostListPath({ name: 'hostList' })), onClick: goToEndpoint, }, { diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/index.tsx index ff7f522b9bc5..a970edd4d30f 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/index.tsx @@ -7,19 +7,19 @@ import { Switch, Route } from 'react-router-dom'; import React, { memo } from 'react'; import { HostList } from './view'; -import { MANAGEMENT_ROUTING_ENDPOINTS_PATH } from '../../common/constants'; +import { MANAGEMENT_ROUTING_HOSTS_PATH } from '../../common/constants'; import { NotFoundPage } from '../../../app/404'; /** - * Provides the routing container for the endpoints related views + * Provides the routing container for the hosts related views */ -export const EndpointsContainer = memo(() => { +export const HostsContainer = memo(() => { return ( - + ); }); -EndpointsContainer.displayName = 'EndpointsContainer'; +HostsContainer.displayName = 'HostsContainer'; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/host_pagination.test.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/host_pagination.test.ts index ae2ce9facc83..533b14e50f3d 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/host_pagination.test.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/host_pagination.test.ts @@ -24,7 +24,7 @@ import { MiddlewareActionSpyHelper, createSpyMiddleware, } from '../../../../common/store/test_utils'; -import { getEndpointListPath } from '../../../common/routing'; +import { getHostListPath } from '../../../common/routing'; describe('host list pagination: ', () => { let fakeCoreStart: jest.Mocked; @@ -56,7 +56,7 @@ describe('host list pagination: ', () => { queryParams = () => uiQueryParams(store.getState()); historyPush = (nextQueryParams: HostIndexUIQueryParams): void => { - return history.push(getEndpointListPath({ name: 'endpointList', ...nextQueryParams })); + return history.push(getHostListPath({ name: 'hostList', ...nextQueryParams })); }; }); @@ -70,7 +70,7 @@ describe('host list pagination: ', () => { type: 'userChangedUrl', payload: { ...history.location, - pathname: getEndpointListPath({ name: 'endpointList' }), + pathname: getHostListPath({ name: 'hostList' }), }, }); await waitForAction('serverReturnedHostList'); diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.test.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.test.ts index e62c53e061a3..1c5c4fbac51b 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.test.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.test.ts @@ -21,7 +21,7 @@ import { listData } from './selectors'; import { HostState } from '../types'; import { hostListReducer } from './reducer'; import { hostMiddlewareFactory } from './middleware'; -import { getEndpointListPath } from '../../../common/routing'; +import { getHostListPath } from '../../../common/routing'; describe('host list middleware', () => { let fakeCoreStart: jest.Mocked; @@ -60,7 +60,7 @@ describe('host list middleware', () => { type: 'userChangedUrl', payload: { ...history.location, - pathname: getEndpointListPath({ name: 'endpointList' }), + pathname: getHostListPath({ name: 'hostList' }), }, }); await waitForAction('serverReturnedHostList'); diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/selectors.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/selectors.ts index e75d2129f61a..4f47eaf565d8 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/selectors.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/selectors.ts @@ -15,7 +15,7 @@ import { HostPolicyResponseActionStatus, } from '../../../../../common/endpoint/types'; import { HostState, HostIndexUIQueryParams } from '../types'; -import { MANAGEMENT_ROUTING_ENDPOINTS_PATH } from '../../../common/constants'; +import { MANAGEMENT_ROUTING_HOSTS_PATH } from '../../../common/constants'; const PAGE_SIZES = Object.freeze([10, 20, 50]); @@ -114,7 +114,7 @@ export const policyResponseError = (state: Immutable) => state.policy export const isOnHostPage = (state: Immutable) => { return ( matchPath(state.location?.pathname ?? '', { - path: MANAGEMENT_ROUTING_ENDPOINTS_PATH, + path: MANAGEMENT_ROUTING_HOSTS_PATH, exact: true, }) !== null ); diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx index 66abf993770a..10ea271139e4 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx @@ -26,7 +26,7 @@ import { POLICY_STATUS_TO_HEALTH_COLOR } from '../host_constants'; import { FormattedDateAndTime } from '../../../../../common/components/endpoint/formatted_date_time'; import { useNavigateByRouterEventHandler } from '../../../../../common/hooks/endpoint/use_navigate_by_router_event_handler'; import { LinkToApp } from '../../../../../common/components/endpoint/link_to_app'; -import { getEndpointDetailsPath, getPolicyDetailPath } from '../../../../common/routing'; +import { getHostDetailsPath, getPolicyDetailPath } from '../../../../common/routing'; import { SecurityPageName } from '../../../../../app/types'; import { useFormatUrl } from '../../../../../common/components/link_to'; import { AgentDetailsReassignConfigAction } from '../../../../../../../ingest_manager/public'; @@ -84,14 +84,14 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => { const { selected_host, show, ...currentUrlParams } = queryParams; return [ formatUrl( - getEndpointDetailsPath({ - name: 'endpointPolicyResponse', + getHostDetailsPath({ + name: 'hostPolicyResponse', ...currentUrlParams, selected_host: details.host.id, }) ), - getEndpointDetailsPath({ - name: 'endpointPolicyResponse', + getHostDetailsPath({ + name: 'hostPolicyResponse', ...currentUrlParams, selected_host: details.host.id, }), @@ -108,7 +108,7 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => { onDoneNavigateTo: [ 'securitySolution:management', { - path: getEndpointDetailsPath({ name: 'endpointDetails', selected_host: details.host.id }), + path: getHostDetailsPath({ name: 'hostDetails', selected_host: details.host.id }), }, ], }, @@ -200,8 +200,8 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => { description: details.host.hostname, }, { - title: i18n.translate('xpack.securitySolution.endpoint.host.details.sensorVersion', { - defaultMessage: 'Sensor Version', + title: i18n.translate('xpack.securitySolution.endpoint.host.details.endpointVersion', { + defaultMessage: 'Endpoint Version', }), description: details.agent.version, }, diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/index.tsx index 3d44b73858e9..e29d796325bd 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/index.tsx @@ -38,7 +38,7 @@ import { PolicyResponse } from './policy_response'; import { HostMetadata } from '../../../../../../common/endpoint/types'; import { FlyoutSubHeader, FlyoutSubHeaderProps } from './components/flyout_sub_header'; import { useNavigateByRouterEventHandler } from '../../../../../common/hooks/endpoint/use_navigate_by_router_event_handler'; -import { getEndpointListPath } from '../../../../common/routing'; +import { getHostListPath } from '../../../../common/routing'; import { SecurityPageName } from '../../../../../app/types'; import { useFormatUrl } from '../../../../../common/components/link_to'; @@ -122,14 +122,14 @@ const PolicyResponseFlyoutPanel = memo<{ const [detailsUri, detailsRoutePath] = useMemo( () => [ formatUrl( - getEndpointListPath({ - name: 'endpointList', + getHostListPath({ + name: 'hostList', ...queryParams, selected_host: hostMeta.host.id, }) ), - getEndpointListPath({ - name: 'endpointList', + getHostListPath({ + name: 'hostList', ...queryParams, selected_host: hostMeta.host.id, }), diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks.ts index b048a8f69b5d..d11335df875e 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks.ts @@ -9,14 +9,14 @@ import { useMemo } from 'react'; import { useKibana } from '../../../../common/lib/kibana'; import { HostState } from '../types'; import { - MANAGEMENT_STORE_ENDPOINTS_NAMESPACE, + MANAGEMENT_STORE_HOSTS_NAMESPACE, MANAGEMENT_STORE_GLOBAL_NAMESPACE, } from '../../../common/constants'; import { State } from '../../../../common/store'; export function useHostSelector(selector: (state: HostState) => TSelected) { return useSelector(function (state: State) { return selector( - state[MANAGEMENT_STORE_GLOBAL_NAMESPACE][MANAGEMENT_STORE_ENDPOINTS_NAMESPACE] as HostState + state[MANAGEMENT_STORE_GLOBAL_NAMESPACE][MANAGEMENT_STORE_HOSTS_NAMESPACE] as HostState ); }); } diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx index 9766cd6abd2b..996b987ea2be 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx @@ -44,7 +44,7 @@ describe('when on the hosts page', () => { it('should show the empty state when there are no hosts or polices', async () => { const renderResult = render(); - // Initially, there are no endpoints or policies, so we prompt to add policies first. + // Initially, there are no hosts or policies, so we prompt to add policies first. const table = await renderResult.findByTestId('emptyPolicyTable'); expect(table).not.toBeNull(); }); @@ -79,8 +79,8 @@ describe('when on the hosts page', () => { it('should show the no hosts empty state', async () => { const renderResult = render(); - const emptyEndpointsTable = await renderResult.findByTestId('emptyEndpointsTable'); - expect(emptyEndpointsTable).not.toBeNull(); + const emptyHostsTable = await renderResult.findByTestId('emptyHostsTable'); + expect(emptyHostsTable).not.toBeNull(); }); it('should display the onboarding steps', async () => { @@ -335,7 +335,7 @@ describe('when on the hosts page', () => { const policyStatusLink = await renderResult.findByTestId('policyStatusValue'); expect(policyStatusLink).not.toBeNull(); expect(policyStatusLink.getAttribute('href')).toEqual( - '/endpoints?page_index=0&page_size=10&selected_host=1&show=policy_response' + '/hosts?page_index=0&page_size=10&selected_host=1&show=policy_response' ); }); @@ -549,7 +549,7 @@ describe('when on the hosts page', () => { const subHeaderBackLink = await renderResult.findByTestId('flyoutSubHeaderBackButton'); expect(subHeaderBackLink.textContent).toBe('Endpoint Details'); expect(subHeaderBackLink.getAttribute('href')).toBe( - '/endpoints?page_index=0&page_size=10&selected_host=1' + '/hosts?page_index=0&page_size=10&selected_host=1' ); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx index d49335ca8de2..492c75607a25 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx @@ -10,6 +10,8 @@ import { EuiBasicTable, EuiBasicTableColumn, EuiText, + EuiTitle, + EuiSpacer, EuiLink, EuiHealth, EuiToolTip, @@ -33,7 +35,7 @@ import { CreateStructuredSelector } from '../../../../common/store'; import { Immutable, HostInfo } from '../../../../../common/endpoint/types'; import { SpyRoute } from '../../../../common/utils/route/spy_routes'; import { ManagementPageView } from '../../../components/management_page_view'; -import { PolicyEmptyState, EndpointsEmptyState } from '../../../components/management_empty_state'; +import { PolicyEmptyState, HostsEmptyState } from '../../../components/management_empty_state'; import { FormattedDate } from '../../../../common/components/formatted_date'; import { useNavigateToAppEventHandler } from '../../../../common/hooks/endpoint/use_navigate_to_app_event_handler'; import { @@ -41,11 +43,7 @@ import { AgentConfigDetailsDeployAgentAction, } from '../../../../../../ingest_manager/public'; import { SecurityPageName } from '../../../../app/types'; -import { - getEndpointListPath, - getEndpointDetailsPath, - getPolicyDetailPath, -} from '../../../common/routing'; +import { getHostListPath, getHostDetailsPath, getPolicyDetailPath } from '../../../common/routing'; import { useFormatUrl } from '../../../../common/components/link_to'; import { HostAction } from '../store/action'; @@ -107,8 +105,8 @@ export const HostList = () => { const { index, size } = page; // FIXME: PT: if host details is open, table is not displaying correct number of rows history.push( - getEndpointListPath({ - name: 'endpointList', + getHostListPath({ + name: 'hostList', ...queryParams, page_index: JSON.stringify(index), page_size: JSON.stringify(size), @@ -127,12 +125,12 @@ export const HostList = () => { state: { onCancelNavigateTo: [ 'securitySolution:management', - { path: getEndpointListPath({ name: 'endpointList' }) }, + { path: getHostListPath({ name: 'hostList' }) }, ], - onCancelUrl: formatUrl(getEndpointListPath({ name: 'endpointList' })), + onCancelUrl: formatUrl(getHostListPath({ name: 'hostList' })), onSaveNavigateTo: [ 'securitySolution:management', - { path: getEndpointListPath({ name: 'endpointList' }) }, + { path: getHostListPath({ name: 'hostList' }) }, ], }, } @@ -145,7 +143,7 @@ export const HostList = () => { state: { onDoneNavigateTo: [ 'securitySolution:management', - { path: getEndpointListPath({ name: 'endpointList' }) }, + { path: getHostListPath({ name: 'hostList' }) }, ], }, }); @@ -191,10 +189,10 @@ export const HostList = () => { defaultMessage: 'Hostname', }), render: ({ hostname, id }: HostInfo['metadata']['host']) => { - const toRoutePath = getEndpointDetailsPath( + const toRoutePath = getHostDetailsPath( { ...queryParams, - name: 'endpointDetails', + name: 'hostDetails', selected_host: id, }, search @@ -259,8 +257,8 @@ export const HostList = () => { }), // eslint-disable-next-line react/display-name render: (policy: HostInfo['metadata']['Endpoint']['policy']['applied'], item: HostInfo) => { - const toRoutePath = getEndpointDetailsPath({ - name: 'endpointPolicyResponse', + const toRoutePath = getHostDetailsPath({ + name: 'hostPolicyResponse', selected_host: item.metadata.host.id, }); const toRouteUrl = formatUrl(toRoutePath); @@ -341,7 +339,7 @@ export const HostList = () => { ); } else if (!policyItemsLoading && policyItems && policyItems.length > 0) { return ( - { + +

+ +

+
+ + +

+ +

+
+ + } > {hasSelectedHost && } {listData && listData.length > 0 && ( diff --git a/x-pack/plugins/security_solution/public/management/pages/index.tsx b/x-pack/plugins/security_solution/public/management/pages/index.tsx index 0e81b75d651b..2cf07b9b4382 100644 --- a/x-pack/plugins/security_solution/public/management/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/index.tsx @@ -9,25 +9,25 @@ import { useHistory, Route, Switch } from 'react-router-dom'; import { PolicyContainer } from './policy'; import { - MANAGEMENT_ROUTING_ENDPOINTS_PATH, + MANAGEMENT_ROUTING_HOSTS_PATH, MANAGEMENT_ROUTING_POLICIES_PATH, MANAGEMENT_ROUTING_ROOT_PATH, } from '../common/constants'; import { NotFoundPage } from '../../app/404'; -import { EndpointsContainer } from './endpoint_hosts'; -import { getEndpointListPath } from '../common/routing'; +import { HostsContainer } from './endpoint_hosts'; +import { getHostListPath } from '../common/routing'; export const ManagementContainer = memo(() => { const history = useHistory(); return ( - + { - history.replace(getEndpointListPath({ name: 'endpointList' })); + history.replace(getHostListPath({ name: 'hostList' })); return null; }} /> diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx index 447a70ef998a..aa7e867e89d6 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx @@ -8,6 +8,8 @@ import React, { useCallback, useEffect, useMemo, CSSProperties, useState } from import { EuiBasicTable, EuiText, + EuiTitle, + EuiSpacer, EuiFlexGroup, EuiFlexItem, EuiTableFieldDataColumnType, @@ -20,7 +22,6 @@ import { EuiOverlayMask, EuiConfirmModal, EuiCallOut, - EuiSpacer, EuiButton, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -391,9 +392,27 @@ export const PolicyList = React.memo(() => { + +

+ +

+
+ + +

+ +

+
+ + } headerRight={ const policyDetailsSelector = (state: State) => state[MANAGEMENT_STORE_GLOBAL_NAMESPACE][MANAGEMENT_STORE_POLICY_DETAILS_NAMESPACE]; const endpointsSelector = (state: State) => - state[MANAGEMENT_STORE_GLOBAL_NAMESPACE][MANAGEMENT_STORE_ENDPOINTS_NAMESPACE]; + state[MANAGEMENT_STORE_GLOBAL_NAMESPACE][MANAGEMENT_STORE_HOSTS_NAMESPACE]; export const managementMiddlewareFactory: SecuritySubPluginMiddlewareFactory = ( coreStart, diff --git a/x-pack/plugins/security_solution/public/management/store/reducer.ts b/x-pack/plugins/security_solution/public/management/store/reducer.ts index 2ed3dfe86d2f..f3c470fb1e8a 100644 --- a/x-pack/plugins/security_solution/public/management/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/management/store/reducer.ts @@ -14,7 +14,7 @@ import { initialPolicyListState, } from '../pages/policy/store/policy_list/reducer'; import { - MANAGEMENT_STORE_ENDPOINTS_NAMESPACE, + MANAGEMENT_STORE_HOSTS_NAMESPACE, MANAGEMENT_STORE_POLICY_DETAILS_NAMESPACE, MANAGEMENT_STORE_POLICY_LIST_NAMESPACE, } from '../common/constants'; @@ -31,7 +31,7 @@ const immutableCombineReducers: ImmutableCombineReducers = combineReducers; export const mockManagementState: Immutable = { [MANAGEMENT_STORE_POLICY_LIST_NAMESPACE]: initialPolicyListState(), [MANAGEMENT_STORE_POLICY_DETAILS_NAMESPACE]: initialPolicyDetailsState(), - [MANAGEMENT_STORE_ENDPOINTS_NAMESPACE]: initialHostListState, + [MANAGEMENT_STORE_HOSTS_NAMESPACE]: initialHostListState, }; /** @@ -40,5 +40,5 @@ export const mockManagementState: Immutable = { export const managementReducer = immutableCombineReducers({ [MANAGEMENT_STORE_POLICY_LIST_NAMESPACE]: policyListReducer, [MANAGEMENT_STORE_POLICY_DETAILS_NAMESPACE]: policyDetailsReducer, - [MANAGEMENT_STORE_ENDPOINTS_NAMESPACE]: hostListReducer, + [MANAGEMENT_STORE_HOSTS_NAMESPACE]: hostListReducer, }); diff --git a/x-pack/plugins/security_solution/public/management/types.ts b/x-pack/plugins/security_solution/public/management/types.ts index 854e9faa0204..cb21a236ddd7 100644 --- a/x-pack/plugins/security_solution/public/management/types.ts +++ b/x-pack/plugins/security_solution/public/management/types.ts @@ -18,14 +18,14 @@ export type ManagementStoreGlobalNamespace = 'management'; export type ManagementState = CombinedState<{ policyList: PolicyListState; policyDetails: PolicyDetailsState; - endpoints: HostState; + hosts: HostState; }>; /** * The management list of sub-tabs. Changes to these will impact the Router routes. */ export enum ManagementSubTab { - endpoints = 'endpoints', + hosts = 'hosts', policies = 'policy', } diff --git a/x-pack/plugins/security_solution/public/overview/components/endpoint_notice/index.tsx b/x-pack/plugins/security_solution/public/overview/components/endpoint_notice/index.tsx index ee048f0d6121..3758bd10bfc8 100644 --- a/x-pack/plugins/security_solution/public/overview/components/endpoint_notice/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/endpoint_notice/index.tsx @@ -7,13 +7,13 @@ import React, { memo } from 'react'; import { EuiCallOut, EuiButton, EuiButtonEmpty } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -import { getEndpointListPath } from '../../../management/common/routing'; +import { getHostListPath } from '../../../management/common/routing'; import { useNavigateToAppEventHandler } from '../../../common/hooks/endpoint/use_navigate_to_app_event_handler'; import { useManagementFormatUrl } from '../../../management/components/hooks/use_management_format_url'; import { MANAGEMENT_APP_ID } from '../../../management/common/constants'; export const EndpointNotice = memo<{ onDismiss: () => void }>(({ onDismiss }) => { - const endpointsPath = getEndpointListPath({ name: 'endpointList' }); + const endpointsPath = getHostListPath({ name: 'hostList' }); const endpointsLink = useManagementFormatUrl(endpointsPath); const handleGetStartedClick = useNavigateToAppEventHandler(MANAGEMENT_APP_ID, { path: endpointsPath, diff --git a/x-pack/plugins/security_solution/public/plugin.tsx b/x-pack/plugins/security_solution/public/plugin.tsx index 18072c25e6dd..2b7fc160110f 100644 --- a/x-pack/plugins/security_solution/public/plugin.tsx +++ b/x-pack/plugins/security_solution/public/plugin.tsx @@ -48,6 +48,15 @@ import { ConfigureEndpointPackageConfig } from './management/pages/policy/view/i import { State, createStore, createInitialState } from './common/store'; import { SecurityPageName } from './app/types'; import { manageOldSiemRoutes } from './helpers'; +import { + OVERVIEW, + HOSTS, + NETWORK, + TIMELINES, + ALERTS, + CASE, + ADMINISTRATION, +} from './app/home/translations'; export class Plugin implements IPlugin { private kibanaVersion: string; @@ -95,10 +104,12 @@ export class Plugin implements IPlugin { + mount: async () => { const [{ application }] = await core.getStartServices(); application.navigateToApp(`${APP_ID}:${SecurityPageName.overview}`, { replace: true }); return () => true; @@ -107,9 +118,7 @@ export class Plugin implements IPlugin { const esArchiver = getService('esArchiver'); const testSubjects = getService('testSubjects'); - describe('endpoint list', function () { + describe('host list', function () { this.tags('ciGroup7'); const sleep = (ms = 100) => new Promise((resolve) => setTimeout(resolve, ms)); describe('when there is data,', () => { before(async () => { await esArchiver.load('endpoint/metadata/api_feature', { useCreate: true }); - await pageObjects.endpoint.navigateToEndpointList(); + await pageObjects.endpoint.navigateToHostList(); }); after(async () => { await deleteMetadataStream(getService); @@ -28,7 +28,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { it('finds page title', async () => { const title = await testSubjects.getVisibleText('pageViewHeaderLeftTitle'); - expect(title).to.equal('Endpoints'); + expect(title).to.equal('Hosts'); }); it('displays table data', async () => { @@ -129,7 +129,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { // This set of tests fails the flyout does not open in the before() and will be fixed in soon describe.skip('has a url with a host id', () => { before(async () => { - await pageObjects.endpoint.navigateToEndpointList( + await pageObjects.endpoint.navigateToHostList( 'selected_host=fc0ff548-feba-41b6-8367-65e8790d0eaf' ); }); @@ -178,7 +178,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { before(async () => { // clear out the data and reload the page await deleteMetadataStream(getService); - await pageObjects.endpoint.navigateToEndpointList(); + await pageObjects.endpoint.navigateToHostList(); }); it('displays empty Policy Table page.', async () => { await testSubjects.existOrFail('emptyPolicyTable'); diff --git a/x-pack/test/security_solution_endpoint/config.ts b/x-pack/test/security_solution_endpoint/config.ts index f02a6bdcd51e..2d94163fa101 100644 --- a/x-pack/test/security_solution_endpoint/config.ts +++ b/x-pack/test/security_solution_endpoint/config.ts @@ -23,7 +23,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { apps: { ...xpackFunctionalConfig.get('apps'), ['securitySolutionManagement']: { - pathname: '/app/security/management', + pathname: '/app/security/administration', }, }, kbnTestServer: { diff --git a/x-pack/test/security_solution_endpoint/page_objects/endpoint_page.ts b/x-pack/test/security_solution_endpoint/page_objects/endpoint_page.ts index 7339903d74a0..ae4320fc5395 100644 --- a/x-pack/test/security_solution_endpoint/page_objects/endpoint_page.ts +++ b/x-pack/test/security_solution_endpoint/page_objects/endpoint_page.ts @@ -14,12 +14,12 @@ export function EndpointPageProvider({ getService, getPageObjects }: FtrProvider return { /** - * Navigate to the Endpoints list page + * Navigate to the Hosts list page */ - async navigateToEndpointList(searchParams?: string) { + async navigateToHostList(searchParams?: string) { await pageObjects.common.navigateToUrlWithBrowserHistory( 'securitySolutionManagement', - `/endpoints${searchParams ? `?${searchParams}` : ''}` + `/hosts${searchParams ? `?${searchParams}` : ''}` ); await pageObjects.header.waitUntilLoadingHasFinished(); },