Skip to content

Commit 77ebb0d

Browse files
kevinlogparkiinoelasticmachine
authored
[SECURITY_SOLUTION][Administration] Task/remove policy tab (#73352) (#73598)
Co-authored-by: Candace Park <56409205+parkiino@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent d45bb2f commit 77ebb0d

File tree

15 files changed

+68
-179
lines changed

15 files changed

+68
-179
lines changed

x-pack/plugins/security_solution/public/management/components/management_empty_state.tsx

Lines changed: 6 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -77,57 +77,6 @@ const PolicyEmptyState = React.memo<{
7777
/>
7878
</EuiText>
7979
<EuiSpacer size="m" />
80-
<EuiFlexGroup alignItems="center" style={{ maxWidth: '90%' }}>
81-
<EuiFlexItem>
82-
<EuiFlexGroup>
83-
<EuiFlexItem grow={false} style={{ marginRight: '10px' }}>
84-
<EuiIcon type="grid" />
85-
</EuiFlexItem>
86-
<EuiFlexItem grow={false} style={{ marginLeft: '0' }}>
87-
<EuiText>
88-
<h4>
89-
<FormattedMessage
90-
id="xpack.securitySolution.endpoint.policyList.onboardingHostTitle"
91-
defaultMessage="Hosts"
92-
/>
93-
</h4>
94-
</EuiText>
95-
</EuiFlexItem>
96-
</EuiFlexGroup>
97-
<EuiSpacer size="s" />
98-
<EuiText size="xs" color="subdued">
99-
<FormattedMessage
100-
id="xpack.securitySolution.endpoint.policyList.onboardingHostInfo"
101-
defaultMessage="Hosts running Elastic Endpoint Security"
102-
/>
103-
</EuiText>
104-
</EuiFlexItem>
105-
<EuiFlexItem>
106-
<EuiFlexGroup>
107-
<EuiFlexItem grow={false} style={{ marginRight: '10px' }}>
108-
<EuiIcon type="controlsHorizontal" />
109-
</EuiFlexItem>
110-
<EuiFlexItem grow={false} style={{ marginLeft: '0' }}>
111-
<EuiText>
112-
<h4>
113-
<FormattedMessage
114-
id="xpack.securitySolution.endpoint.policyList.onboardingPolicyTitle"
115-
defaultMessage="Policies"
116-
/>
117-
</h4>
118-
</EuiText>
119-
</EuiFlexItem>
120-
</EuiFlexGroup>
121-
<EuiSpacer size="s" />
122-
<EuiText size="xs" color="subdued">
123-
<FormattedMessage
124-
id="xpack.securitySolution.endpoint.policyList.onboardingPolicyInfo"
125-
defaultMessage="View and configure protections"
126-
/>
127-
</EuiText>
128-
</EuiFlexItem>
129-
</EuiFlexGroup>
130-
<EuiSpacer size="m" />
13180
<EuiText size="s" color="subdued">
13281
<FormattedMessage
13382
id="xpack.securitySolution.endpoint.policyList.onboardingSectionThree"
@@ -178,14 +127,14 @@ const HostsEmptyState = React.memo<{
178127
() => [
179128
{
180129
title: i18n.translate('xpack.securitySolution.endpoint.hostList.stepOneTitle', {
181-
defaultMessage: 'Select the policy you want to use to protect your hosts',
130+
defaultMessage: 'Select the integration you want to use',
182131
}),
183132
children: (
184133
<>
185134
<EuiText color="subdued" size="m" grow={false}>
186135
<FormattedMessage
187136
id="xpack.securitySolution.endpoint.hostList.stepOne"
188-
defaultMessage="Existing policies are listed below. This can be changed later."
137+
defaultMessage="Select from existing integrations. This can be changed later."
189138
/>
190139
</EuiText>
191140
<EuiSpacer size="xxl" />
@@ -203,15 +152,15 @@ const HostsEmptyState = React.memo<{
203152
<EuiSelectableMessage>
204153
<FormattedMessage
205154
id="xpack.securitySolution.endpoint.hostList.loadingPolicies"
206-
defaultMessage="Loading policy configs"
155+
defaultMessage="Loading integrations"
207156
/>
208157
</EuiSelectableMessage>
209158
) : selectionOptions.length ? (
210159
list
211160
) : (
212161
<FormattedMessage
213162
id="xpack.securitySolution.endpoint.hostList.noPolicies"
214-
defaultMessage="There are no policies."
163+
defaultMessage="There are no integrations."
215164
/>
216165
);
217166
}}
@@ -263,13 +212,13 @@ const HostsEmptyState = React.memo<{
263212
headerComponent={
264213
<FormattedMessage
265214
id="xpack.securitySolution.endpoint.hostList.noEndpointsPrompt"
266-
defaultMessage="Enable Elastic Endpoint Security on your agents"
215+
defaultMessage="Next step: Enroll an Agent with Elastic Endpoint Security"
267216
/>
268217
}
269218
bodyComponent={
270219
<FormattedMessage
271220
id="xpack.securitySolution.endpoint.hostList.noEndpointsInstructions"
272-
defaultMessage="You’ve created your security policy. Now you need to enable the Elastic Endpoint Security capabilities on your agents following the steps below."
221+
defaultMessage="You’ve added the Endpoint Security integration. Now enroll your agents using the steps below."
273222
/>
274223
}
275224
/>

x-pack/plugins/security_solution/public/management/components/management_page_view.tsx

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,11 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
import React, { memo, useMemo } from 'react';
8-
import { i18n } from '@kbn/i18n';
9-
import { useParams } from 'react-router-dom';
7+
import React, { memo } from 'react';
108
import { PageView, PageViewProps } from '../../common/components/endpoint/page_view';
11-
import { AdministrationSubTab } from '../types';
12-
import { SecurityPageName } from '../../app/types';
13-
import { useFormatUrl } from '../../common/components/link_to';
14-
import { getHostListPath, getPoliciesPath } from '../common/routing';
15-
import { useNavigateByRouterEventHandler } from '../../common/hooks/endpoint/use_navigate_by_router_event_handler';
169

1710
export const ManagementPageView = memo<Omit<PageViewProps, 'tabs'>>((options) => {
18-
const { formatUrl, search } = useFormatUrl(SecurityPageName.administration);
19-
const { tabName } = useParams<{ tabName: AdministrationSubTab }>();
20-
21-
const goToEndpoint = useNavigateByRouterEventHandler(
22-
getHostListPath({ name: 'hostList' }, search)
23-
);
24-
25-
const goToPolicies = useNavigateByRouterEventHandler(getPoliciesPath(search));
26-
27-
const tabs = useMemo((): PageViewProps['tabs'] | undefined => {
28-
if (options.viewType === 'details') {
29-
return undefined;
30-
}
31-
return [
32-
{
33-
name: i18n.translate('xpack.securitySolution.managementTabs.hosts', {
34-
defaultMessage: 'Hosts',
35-
}),
36-
id: AdministrationSubTab.hosts,
37-
isSelected: tabName === AdministrationSubTab.hosts,
38-
href: formatUrl(getHostListPath({ name: 'hostList' })),
39-
onClick: goToEndpoint,
40-
},
41-
{
42-
name: i18n.translate('xpack.securitySolution.managementTabs.policies', {
43-
defaultMessage: 'Policies',
44-
}),
45-
id: AdministrationSubTab.policies,
46-
isSelected: tabName === AdministrationSubTab.policies,
47-
href: formatUrl(getPoliciesPath()),
48-
onClick: goToPolicies,
49-
},
50-
];
51-
}, [formatUrl, goToEndpoint, goToPolicies, options.viewType, tabName]);
52-
return <PageView {...options} tabs={tabs} />;
11+
return <PageView {...options} />;
5312
});
5413

5514
ManagementPageView.displayName = 'ManagementPageView';

x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => {
121121
return [
122122
{
123123
title: i18n.translate('xpack.securitySolution.endpoint.host.details.policy', {
124-
defaultMessage: 'Policy',
124+
defaultMessage: 'Integration',
125125
}),
126126
description: (
127127
<>
@@ -136,7 +136,7 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => {
136136
},
137137
{
138138
title: i18n.translate('xpack.securitySolution.endpoint.host.details.policyStatus', {
139-
defaultMessage: 'Policy Status',
139+
defaultMessage: 'Configuration response',
140140
}),
141141
description: (
142142
<EuiHealth
@@ -216,7 +216,7 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => {
216216
<EuiIcon type="savedObjectsApp" className="linkToAppIcon" />
217217
<FormattedMessage
218218
id="xpack.securitySolution.endpoint.host.details.linkToIngestTitle"
219-
defaultMessage="Reassign Policy"
219+
defaultMessage="Reassign Configuration"
220220
/>
221221
<EuiIcon type="popout" className="linkToAppPopoutIcon" />
222222
</LinkToApp>

x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ const PolicyResponseFlyoutPanel = memo<{
158158
<h4>
159159
<FormattedMessage
160160
id="xpack.securitySolution.endpoint.host.policyResponse.title"
161-
defaultMessage="Policy Response"
161+
defaultMessage="Configuration Response"
162162
/>
163163
</h4>
164164
</EuiText>
@@ -167,7 +167,7 @@ const PolicyResponseFlyoutPanel = memo<{
167167
title={
168168
<FormattedMessage
169169
id="xpack.securitySolution.endpoint.hostDetails.noPolicyResponse"
170-
defaultMessage="No policy response available"
170+
defaultMessage="No configuration response available"
171171
/>
172172
}
173173
/>

x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ describe('when on the hosts page', () => {
431431
const renderResult = render();
432432
const linkToReassign = await renderResult.findByTestId('hostDetailsLinkToIngest');
433433
expect(linkToReassign).not.toBeNull();
434-
expect(linkToReassign.textContent).toEqual('Reassign Policy');
434+
expect(linkToReassign.textContent).toEqual('Reassign Configuration');
435435
expect(linkToReassign.getAttribute('href')).toEqual(
436436
`/app/ingestManager#/fleet/agents/${agentId}/activity?openReassignFlyout=true`
437437
);
@@ -492,7 +492,7 @@ describe('when on the hosts page', () => {
492492
it('should include the sub-panel title', async () => {
493493
expect(
494494
(await renderResult.findByTestId('hostDetailsPolicyResponseFlyoutTitle')).textContent
495-
).toBe('Policy Response');
495+
).toBe('Configuration Response');
496496
});
497497

498498
it('should show a configuration section for each protection', async () => {

x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export const HostList = () => {
237237
{
238238
field: 'metadata.Endpoint.policy.applied',
239239
name: i18n.translate('xpack.securitySolution.endpointList.policy', {
240-
defaultMessage: 'Policy',
240+
defaultMessage: 'Integration',
241241
}),
242242
truncateText: true,
243243
// eslint-disable-next-line react/display-name
@@ -256,7 +256,7 @@ export const HostList = () => {
256256
{
257257
field: 'metadata.Endpoint.policy.applied',
258258
name: i18n.translate('xpack.securitySolution.endpointList.policyStatus', {
259-
defaultMessage: 'Policy Status',
259+
defaultMessage: 'Configuration Status',
260260
}),
261261
// eslint-disable-next-line react/display-name
262262
render: (policy: HostInfo['metadata']['Endpoint']['policy']['applied'], item: HostInfo) => {

x-pack/plugins/security_solution/public/management/pages/policy/index.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,13 @@
66

77
import React, { memo } from 'react';
88
import { Route, Switch } from 'react-router-dom';
9-
import { PolicyDetails, PolicyList } from './view';
10-
import {
11-
MANAGEMENT_ROUTING_POLICIES_PATH,
12-
MANAGEMENT_ROUTING_POLICY_DETAILS_PATH,
13-
} from '../../common/constants';
9+
import { PolicyDetails } from './view';
10+
import { MANAGEMENT_ROUTING_POLICY_DETAILS_PATH } from '../../common/constants';
1411
import { NotFoundPage } from '../../../app/404';
1512

1613
export const PolicyContainer = memo(() => {
1714
return (
1815
<Switch>
19-
<Route path={MANAGEMENT_ROUTING_POLICIES_PATH} exact component={PolicyList} />
2016
<Route path={MANAGEMENT_ROUTING_POLICY_DETAILS_PATH} exact component={PolicyDetails} />
2117
<Route path="*" component={NotFoundPage} />
2218
</Switch>

x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/configure_package_config.tsx

Lines changed: 21 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77
import React, { memo, useMemo } from 'react';
88
import { FormattedMessage } from '@kbn/i18n/react';
9-
import { EuiCallOut, EuiText, EuiTitle, EuiSpacer } from '@elastic/eui';
10-
import { i18n } from '@kbn/i18n';
9+
import { EuiCallOut, EuiText, EuiSpacer } from '@elastic/eui';
1110
import { LinkToApp } from '../../../../../common/components/endpoint/link_to_app';
1211
import {
1312
CustomConfigurePackageConfigContent,
@@ -50,52 +49,37 @@ export const ConfigureEndpointPackageConfig = memo<CustomConfigurePackageConfigC
5049

5150
return (
5251
<>
53-
<EuiTitle size="xs">
54-
<h4>
55-
<FormattedMessage
56-
id="xpack.securitySolution.endpoint.ingestManager.policyConfiguration"
57-
defaultMessage="Policy Configuration"
58-
/>
59-
</h4>
60-
</EuiTitle>
6152
<EuiSpacer size="m" />
6253
<EuiCallOut
6354
data-test-subj={`endpointPackageConfig_${from === 'edit' ? 'edit' : 'create'}`}
6455
iconType="iInCircle"
65-
title={i18n.translate(
66-
'xpack.securitySolution.endpoint.ingestManager.policyConfiguration.calloutTitle',
67-
{
68-
defaultMessage: 'Manage Policy configuration in the Security app',
69-
}
70-
)}
7156
>
7257
<EuiText size="s">
7358
<p>
7459
{from === 'edit' ? (
75-
<>
76-
<FormattedMessage
77-
id="xpack.securitySolution.endpoint.ingestManager.editPackageConfig.endpointConfiguration"
78-
defaultMessage="You can make changes to the Policy Configuration in the Security app. Fleet will deploy changes to your agents whenever your Policy changes."
79-
/>
80-
<EuiSpacer />
81-
<LinkToApp
82-
data-test-subj="editLinkToPolicyDetails"
83-
asButton={true}
84-
appId={MANAGEMENT_APP_ID}
85-
className="editLinkToPolicyDetails"
86-
appPath={policyUrl}
87-
appState={policyDetailRouteState}
88-
>
89-
<FormattedMessage
90-
id="xpack.securitySolution.endpoint.ingestManager.editPackageConfig.configurePolicyLink"
91-
defaultMessage="Configure Policy"
92-
/>
93-
</LinkToApp>
94-
</>
60+
<FormattedMessage
61+
id="xpack.securitySolution.endpoint.ingestManager.editPackageConfig.endpointConfiguration"
62+
defaultMessage="Click {advancedConfigOptionsLink} to edit advanced configuration options."
63+
values={{
64+
advancedConfigOptionsLink: (
65+
<LinkToApp
66+
data-test-subj="editLinkToPolicyDetails"
67+
appId={MANAGEMENT_APP_ID}
68+
appPath={policyUrl}
69+
appState={policyDetailRouteState}
70+
>
71+
<FormattedMessage
72+
id="xpack.securitySolution.endpoint.ingestManager.editPackageConfig.endpointConfigurationLink"
73+
defaultMessage="here"
74+
/>
75+
</LinkToApp>
76+
),
77+
}}
78+
/>
9579
) : (
9680
<FormattedMessage
9781
id="xpack.securitySolution.endpoint.ingestManager.createPackageConfig.endpointConfiguration"
98-
defaultMessage="Any agents that use this agent configuration will use a basic policy. You can make changes to this policy in the Security app, and Fleet will deploy those changes to your agents."
82+
defaultMessage="We'll save your integration with our recommended defaults. You can change this later by editing the Endpoint Security integration within your agent configuration."
9983
/>
10084
)}
10185
</p>

0 commit comments

Comments
 (0)